void Terminate() { Stream = null; Client = null; RecvTask = null; CancellTokenSource = null; RecvMsg = null; }
public MessageManager(TcpClient client, IRecieveMessage recvMsg) { Debug.Assert(client != null); Debug.Assert(recvMsg != null); Client = client; Stream = Client.GetStream(); RecvMsg = recvMsg; Debug.Assert(Stream != null); }