public static IServiceCollection AddClientSocket(this IServiceCollection services, Action <SocketOptions> configureOptions) { var socket = SocketFactory.CreateTcpSocket(); services.AddOptions <SocketOptions>().Configure(configureOptions); return(services.AddSocketService(socket)); }
public SocketListeningService(ISender sender, IOptions <SocketListeningOptions> options) { this.sender = sender; this.options = options; listeningSocket = SocketFactory.CreateTcpSocket(); }