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)); }
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)); }