public EndPoint Bind(FileHandleEndPoint fileHandleEndPoint, ChannelWriter <ConnectionContext> acceptQueue) { var context = AcceptSocket.Bind(fileHandleEndPoint, acceptQueue, _options); Bind(context); return(context.EndPoint); }
public EndPoint Bind(UnixDomainSocketEndPoint unixDomainSocketEndPoint, ChannelWriter <ConnectionContext> acceptQueue) { var context = AcceptSocket.Bind(unixDomainSocketEndPoint, acceptQueue, _options); Bind(context); return(context.EndPoint); }
private void Bind(AcceptSocket context) { var threads = _transportThreads; var handlers = new LinuxSocket[threads.Length]; for (var i = 0; i < threads.Length; i++) { handlers[i] = threads[i].RegisterHandlerFor(context.AcceptQueue, context.EndPoint); } context.Handlers = handlers; int socket = context.Socket; _acceptSockets[socket] = context; _acceptSocketsPerEndPoint[context.EndPoint] = context; _scheduler.ScheduleAsyncAcceptPoll(socket); }