Guest User

Untitled

a guest
Apr 24th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. NetworkStream stream= tcpclient.GetStream();
  2. var bytes= stream.Read(bytes, 0, tcpclient.ReceiveBufferSize);
  3. nameUser= Encoding.ASCII.GetString(bytes, 0, bytes);
  4.  
  5. var users= String.Join("x", userList);
  6. Console.WriteLine("Connected users " + users);
  7. ChatServer.Broadcast(users, nameUser, false);
  8.  
  9. byte[] bytes = new byte[10025];
  10. stream= Client.GetStream();
  11. var byte= Netstream.Read(bytes, 0, (int)Client.ReceiveBufferSize);
  12. string msg= Encoding.ASCII.GetString(bytes, 0, byte);
  13. if (msg.Contains("x") == true)
  14. {
  15. elements = msg.Split(new[] { 'x' });
  16. }
Add Comment
Please, Sign In to add comment