Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _ClientSocket.Send(ASCIIEncoding.ASCII.GetBytes("REGISTER_ME");
- _ClientSocket.Send(ASCIIEncoding.ASCII.GetBytes(System.Environment.MachineName));
- Socket thisSocket = (Socket)AsyncResult.AsyncState;
- int Received = thisSocket.EndReceive(AsyncResult);
- byte[] DataBuffer = new byte[Received];
- Array.Copy(_Buffer, DataBuffer, Received);
- MessageBox.Show(Encoding.ASCII.GetString(DataBuffer));
- if(Encoding.ASCII.GetString(DataBuffer) == "REGISTER_ME")
- {
- //Here's the problem, I need to find a way to fetch *System.Environment.MachineName* when the command *REGISTER_ME* is requested from the client
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement