Ejemplo n.º 1
0
	public MainWindow () : base (Gtk.WindowType.Toplevel)
	{
		Build ();
		mesh = new Mesh ();
		mesh.Generate ();

		textview2.Buffer.Text += "Hashname: " + mesh.Hashname + "\n";

		var builder = new UriBuilder (mesh.URI);
		builder.Host = "127.0.0.1";
		builder.Port = 8989;
		textview2.Buffer.Text += builder.ToString () + "\n";

		udp = new UDPTransport (new System.Net.IPEndPoint (System.Net.IPAddress.Any, 8989));
		udp.Listen (mesh);
		mesh.DebugLogEvent += new DebugLogHandler (OnDebugLog);
	}
Ejemplo n.º 2
0
		public void Start()
		{
			Mesh = new Mesh ();
			Mesh.Generate ();

			foreach (var cs in Mesh.Self.CipherSets) {
				Console.WriteLine ("{0}: {1}", cs.Key.ToString ("x2"), Telehash.Base32Encoder.EncodeStripped (cs.Value.Keys.PublicKey));
			}
			Console.WriteLine ("Hashname: " + Mesh.Hashname);

			var builder = new UriBuilder (Mesh.URI);
			builder.Host = "127.0.0.1";
			builder.Port = 8989;
			Console.WriteLine (builder.ToString ());

			udp = new UDPTransport (new System.Net.IPEndPoint (System.Net.IPAddress.Any, 8989));
			udp.Listen (Mesh);
			Mesh.DebugLogEvent += new DebugLogHandler (OnDebugLog);
		}