Skip to content

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‎

Lines changed: 5 additions & 3 deletions
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 separateprocess, andcommunicateswithitusingnamedpipes (onWindows) ordomainsockets (onLinux / OSX).
361361
* Thisisfasterthan `Http` becauseitusesalow-levelbinaryprotocolwithverylowoverhead. ItretainsonecontinuousconnectionforthewholelifetimeoftheNodeinstance, soitdoesn'thavetokeepwaitingfornewconnectionstoopen.
362-
* `Http`
362+
* `Http` (default)
363363
* LaunchesNodeasaseparateprocess, andcommunicateswithitbymakingHTTPrequests.
364364
* Thisprimarilyexistsbecauseitwasimplementedbefore `Socket`, butthere'snoparticularreasontouseitnowthat `Socket` isavailable. ItcouldtheoreticallybeusefulifyouwantedtorunNodeinstancesonseparateservers (thoughthereisn'tcurrentlyanybuilt-inAPIforconfiguringthat).
365365

366+
Thedefaulttransportmaychangefrom `Http` to `Socket` inthenearfuture, becauseit'sfaster.
367+
366368
### Custom hosting models
367369

368370
Ifyouimplementacustomhostingmodel (byimplementing `INodeServices`), thenyoucangetinstancesofthatjustbyusingyourtype'sconstructor. Orifyouwanttodesignateitasthedefaulthostingmodelthathigher-levelservices (suchasthoseinthe `SpaServices` package) shoulduse, registeritwithASP.NETCore'sDIsystem:
@@ -372,4 +374,4 @@ services.AddSingleton(typeof(INodeServices), serviceProvider =>
372374
{
373375
returnnewYourCustomHostingModel();
374376
});
375-
```
377+
```

0 commit comments

Comments
(0)