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