Fix references to socket APIs, and target the lowest net standard versions possible

This commit is contained in:
SteveSandersonMS
2016-06-01 18:04:40 +01:00
parent 931ba118e1
commit 311733b113
9 changed files with 45 additions and 9 deletions

View File

@@ -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()
{