Exemplo n.º 1
0
        public void MapSocket(string path, HttpSocketOptions options, Action <ISocketBuilder> socketConfig)
        {
            var socketBuilder = new SocketBuilder(_routes.ServiceProvider);

            socketConfig(socketBuilder);
            var socket = socketBuilder.Build();

            _routes.MapRoute(path, c => _dispatcher.ExecuteAsync(c, options, socket));
        }
Exemplo n.º 2
0
        public void MapSocket(PathString path, HttpSocketOptions options, Action <IConnectionBuilder> connectionConfig)
        {
            var connectionBuilder = new ConnectionBuilder(_routes.ServiceProvider);

            connectionConfig(connectionBuilder);
            var socket = connectionBuilder.Build();

            _routes.MapRoute(path, c => _dispatcher.ExecuteAsync(c, options, socket));
            _routes.MapRoute(path + "/negotiate", c => _dispatcher.ExecuteNegotiateAsync(c, options));
        }