private Datagrams() { network = G2Network.Instance; cache = GHubCache.Instance; data = new Dictionary <NodePeer, List <G2Packet> > (); udp = new UdpClient(network.SelfPort); }
private Datagrams() { network = G2Network.Instance; cache = GHubCache.Instance; data = new Dictionary<NodePeer,List<G2Packet>> (); udp = new UdpClient (network.SelfPort); }
public static void TestNetwork() { G2Network network = G2Network.Instance; network.StartNetwork(); NodePeer p = new NodePeer(IPAddress.Parse("127.0.0.1"), 11000, 0, false); Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); s.Connect(p.Address, p.Port); GHandshake hand = new GHandshake(p); hand.tcp.sock = s; p.AttachTo(hand); Thread.Sleep(10000); network.StopNetwork(); }
public PacketBuffer() { ReceiveBuffer = new Queue(); SendBuffer = new Queue(); network = G2Network.Instance; }
public PacketBuffer() { ReceiveBuffer = new Queue (); SendBuffer = new Queue (); network = G2Network.Instance; }