コード例 #1
0
 public void ReceiveMessage(Socket sourceSocket, Action<string> messageReceivedCallback)
 {
     ReceiveState receiveState = new ReceiveState() {
         SourceSocket = sourceSocket,
         MessageReceivedCallback = messageReceivedCallback
     };
     this.ReceiveInternal(receiveState, 4);
 }
コード例 #2
0
 private void ReceiveInternal(ReceiveState receiveState, int size)
 {
     receiveState.SourceSocket.BeginReceive(receiveState.Buffer, 0, size, 0, this.ReceiveCallback, receiveState);
 }