예제 #1
0
 public static SocketAwaitable ReceiveMessageFromAsync(this Socket socket,
                                                       SocketAwaitable awaitable)
 {
     awaitable.Reset();
     if (!socket.ReceiveMessageFromAsync(awaitable.m_eventArgs))
     {
         awaitable.m_wasCompleted = true;
     }
     return(awaitable);
 }
예제 #2
0
 public static SocketAwaitable SendToAsync(this Socket socket,
                                           SocketAwaitable awaitable)
 {
     awaitable.Reset();
     if (!socket.SendToAsync(awaitable.m_eventArgs))
     {
         awaitable.m_wasCompleted = true;
     }
     return(awaitable);
 }