Пример #1
0
 public MessageReply receiveReply()
 {
     isListening = true;
     MessageReply reply = null;
     //while (isListening)
     {
         var messageID = BitConverter.ToInt32(clientSocket.Recv(), 0);
         var viewNumber = BitConverter.ToInt32(clientSocket.Recv(), 0);
         var requestNumber = BitConverter.ToInt32(clientSocket.Recv(), 0);
         var result = BitConverter.ToBoolean(clientSocket.Recv(), 0);
         reply = new MessageReply(messageID, viewNumber, requestNumber, result);
     }
     return reply;
 }
Пример #2
0
 public void processMessage(MessageReply reply)
 {
     Console.WriteLine("Received:");
     Console.WriteLine(reply.ToString());
 }