Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NetworkStream stream= tcpclient.GetStream();
- var bytes= stream.Read(bytes, 0, tcpclient.ReceiveBufferSize);
- nameUser= Encoding.ASCII.GetString(bytes, 0, bytes);
- var users= String.Join("x", userList);
- Console.WriteLine("Connected users " + users);
- ChatServer.Broadcast(users, nameUser, false);
- byte[] bytes = new byte[10025];
- stream= Client.GetStream();
- var byte= Netstream.Read(bytes, 0, (int)Client.ReceiveBufferSize);
- string msg= Encoding.ASCII.GetString(bytes, 0, byte);
- if (msg.Contains("x") == true)
- {
- elements = msg.Split(new[] { 'x' });
- }
Add Comment
Please, Sign In to add comment