コード例 #1
0
        public EndPoint Bind(FileHandleEndPoint fileHandleEndPoint, ChannelWriter <ConnectionContext> acceptQueue)
        {
            var context = AcceptSocket.Bind(fileHandleEndPoint, acceptQueue, _options);

            Bind(context);

            return(context.EndPoint);
        }
コード例 #2
0
        public EndPoint Bind(UnixDomainSocketEndPoint unixDomainSocketEndPoint, ChannelWriter <ConnectionContext> acceptQueue)
        {
            var context = AcceptSocket.Bind(unixDomainSocketEndPoint, acceptQueue, _options);

            Bind(context);

            return(context.EndPoint);
        }
コード例 #3
0
        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);
        }