From 44bd5f195eb5b7e6e542533e5ed00dad8bb328bd Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 28 Jun 2016 18:06:13 +0100 Subject: [PATCH] Update readme regarding default transport --- src/Microsoft.AspNetCore.NodeServices/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNetCore.NodeServices/README.md b/src/Microsoft.AspNetCore.NodeServices/README.md index 8807c42..f0a231b 100644 --- a/src/Microsoft.AspNetCore.NodeServices/README.md +++ b/src/Microsoft.AspNetCore.NodeServices/README.md @@ -356,13 +356,15 @@ services.AddNodeServices(new NodeServicesOptions **Available hosting models** -* `Socket` (default) +* `Socket` * Launches Node as a separate process, and communicates with it using named pipes (on Windows) or domain sockets (on Linux / OS X). * This is faster than `Http` because it uses a low-level binary protocol with very low overhead. It retains one continuous connection for the whole lifetime of the Node instance, so it doesn't have to keep waiting for new connections to open. -* `Http` +* `Http` (default) * Launches Node as a separate process, and communicates with it by making HTTP requests. * This primarily exists because it was implemented before `Socket`, but there's no particular reason to use it now that `Socket` is available. It could theoretically be useful if you wanted to run Node instances on separate servers (though there isn't currently any built-in API for configuring that). +The default transport may change from `Http` to `Socket` in the near future, because it's faster. + ### Custom hosting models If you implement a custom hosting model (by implementing `INodeServices`), then you can get instances of that just by using your type's constructor. Or if you want to designate it as the default hosting model that higher-level services (such as those in the `SpaServices` package) should use, register it with ASP.NET Core's DI system: @@ -372,4 +374,4 @@ services.AddSingleton(typeof(INodeServices), serviceProvider => { return new YourCustomHostingModel(); }); -``` \ No newline at end of file +```