public void Send(string str) { var chat = new ChatPacket(str, TcpClient.Client.LocalEndPoint.ToString()); var buffer = ChatPacket.CreatePacket(chat); Stream.Write(buffer, 0, buffer.Length); ChatUpdate(chat.ToString()); }