コード例 #1
0
        public static IServiceCollection AddClientSocket(this IServiceCollection services, Action <SocketOptions> configureOptions)
        {
            var socket = SocketFactory.CreateTcpSocket();

            services.AddOptions <SocketOptions>().Configure(configureOptions);
            return(services.AddSocketService(socket));
        }
コード例 #2
0
 public SocketListeningService(ISender sender, IOptions <SocketListeningOptions> options)
 {
     this.sender     = sender;
     this.options    = options;
     listeningSocket = SocketFactory.CreateTcpSocket();
 }