Exemplo n.º 1
0
        public void RemoveConnection(MyTCPChatUser user, GoodbyMessage message)
        {
            StreamWriter writer = new StreamWriter(user.stream);

            writer.Write(message.ToFullString());
            writer.WriteLine();
            writer.Flush();
            usersList.Remove(user);
        }
Exemplo n.º 2
0
        public void GoodByMessage()
        {
            StreamWriter  writer = new StreamWriter(stream);
            GoodbyMessage msg    = new GoodbyMessage
            {
                Name = Name,
                ID   = ID
            };

            writer.Write(msg.ToFullString());
            writer.WriteLine();
            writer.Flush();
        }