public void RemoveConnection(MyTCPChatUser user, GoodbyMessage message) { StreamWriter writer = new StreamWriter(user.stream); writer.Write(message.ToFullString()); writer.WriteLine(); writer.Flush(); usersList.Remove(user); }
public void GoodByMessage() { StreamWriter writer = new StreamWriter(stream); GoodbyMessage msg = new GoodbyMessage { Name = Name, ID = ID }; writer.Write(msg.ToFullString()); writer.WriteLine(); writer.Flush(); }