public BidirectionalStream(NetworkReader from, NetworkWriter to, PacketHandler packetHandler) { reader = from; writer = to; handler = packetHandler; var rStart = new ThreadStart(Run); readerThread = new Thread(rStart); readerThread.Start(); }
private void PassData(NetworkReader from, NetworkWriter to) { Packet packet; { for (; ; ) { packet = Packet.Get(from); packet.Write(to); } } }
public abstract void Write(NetworkWriter writer);
public static void Put(Packet packet, NetworkWriter writer) { packet.Write(writer); writer.Flush(); }