public bool Bind(IPAddress address) { IPEndPoint endpoint = new IPEndPoint(address, 0); SocketBindRoutine routine = new SocketBindRoutine(endpoint); return(routine.Execute(handle)); }
public bool Bind(int port) { IPEndPoint endpoint = new IPEndPoint(IPAddress.Any, port); SocketBindRoutine routine = new SocketBindRoutine(endpoint); return(routine.Execute(handle)); }