mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-25 02:57:31 +00:00
Fix references to socket APIs, and target the lowest net standard versions possible
This commit is contained in:
@@ -9,12 +9,18 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels.PhysicalConnections
|
||||
private bool _disposedValue = false;
|
||||
private NamedPipeClientStream _namedPipeClientStream;
|
||||
|
||||
#pragma warning disable 1998 // Because in the NET451 code path, there's nothing to await
|
||||
public override async Task<Stream> Open(string address)
|
||||
{
|
||||
_namedPipeClientStream = new NamedPipeClientStream(".", address, PipeDirection.InOut);
|
||||
#if NET451
|
||||
_namedPipeClientStream.Connect();
|
||||
#else
|
||||
await _namedPipeClientStream.ConnectAsync().ConfigureAwait(false);
|
||||
#endif
|
||||
return _namedPipeClientStream;
|
||||
}
|
||||
#pragma warning restore 1998
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user