Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 44bd5f1

Browse files
Update readme regarding default transport
1 parent b684aeb commit 44bd5f1

File tree

1 file changed

+5
-3
lines changed
  • src/Microsoft.AspNetCore.NodeServices

1 file changed

+5
-3
lines changed

src/Microsoft.AspNetCore.NodeServices/README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,15 @@ services.AddNodeServices(new NodeServicesOptions
356356

357357
**Available hosting models**
358358

359-
* `Socket` (default)
359+
* `Socket`
360360
* Launches Node as a separate process, and communicates with it using named pipes (on Windows) or domain sockets (on Linux / OS X).
361361
* 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.
362-
* `Http`
362+
* `Http` (default)
363363
* Launches Node as a separate process, and communicates with it by making HTTP requests.
364364
* 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).
365365

366+
The default transport may change from `Http` to `Socket` in the near future, because it's faster.
367+
366368
### Custom hosting models
367369

368370
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 =>
372374
{
373375
return new YourCustomHostingModel();
374376
});
375-
```
377+
```

0 commit comments

Comments
 (0)