コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the UdpClient class and binds it to the specified local endpoint.
 /// </summary>
 /// <param name="localEP">An IPEndPoint that respresents the local endpoint to which you bind the UDP connection.</param>
 // ReSharper disable once InconsistentNaming
 public UdpClientAdapter(IIPEndPoint localEP)
     : this(new UdpClient(localEP.ToImplementation <IPEndPoint>()))
 {
 }
コード例 #2
0
 /// <inheritdoc />
 public Task <int> SendAsync(byte[] datagram, int bytes, IIPEndPoint endPoint)
 {
     return(_client.SendAsync(datagram, bytes, endPoint.ToImplementation <IPEndPoint>()));
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the TcpListener class with the specified local endpoint.
 /// </summary>
 /// <param name="localEP">An IPEndPoint that represents the local endpoint to which to bind the listener Socket.</param>
 // ReSharper disable once InconsistentNaming
 public TcpListenerAdapter(IIPEndPoint localEP)
     : this(new TcpListener(localEP.ToImplementation <IPEndPoint>()))
 {
 }