예제 #1
0
 public void Send(string command)
 {
     SocketSender.Send(
         MaxUDPPacketSize,
         command,
         encodedCommand => UDPSocket.SendTo(encodedCommand, encodedCommand.Length, SocketFlags.None, IPEndpoint));
 }
예제 #2
0
 public Task SendAsync(string command)
 {
     return(SocketSender.SendAsync(
                IPEndpoint,
                UDPSocket,
                MaxUDPPacketSize,
                new ArraySegment <byte>(Encoding.UTF8.GetBytes(command))));
 }