SocketServers.ServerAsyncEventArgs.SetAnyRemote C# (CSharp) Method

SetAnyRemote() public method

public SetAnyRemote ( AddressFamily family ) : void
family AddressFamily
return void
        public void SetAnyRemote(AddressFamily family)
        {
            Trace();
            if (family == AddressFamily.InterNetwork)
                RemoteEndPoint.Address = IPAddress.Any;
            else
                RemoteEndPoint.Address = IPAddress.IPv6Any;

            RemoteEndPoint.Port = 0;
        }

Usage Example

Beispiel #1
0
 private void PrepareBuffer(ServerAsyncEventArgs e)
 {
     e.Completed = new ServerAsyncEventArgs.CompletedEventHandler(this.ReceiveFrom_Completed);
     e.SetAnyRemote(this.realEndPoint.AddressFamily);
     e.AllocateBuffer();
 }
All Usage Examples Of SocketServers.ServerAsyncEventArgs::SetAnyRemote