Skip to content

Commit

Permalink
NuGet v1.3.12, reduce calls to GetStream()
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Christner committed Jun 25, 2019
1 parent 323fb8d commit 1b7153f
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 93 deletions.
6 changes: 3 additions & 3 deletions WatsonTcp/ClientMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public string IpPort

public SemaphoreSlim ReadLock { get; set; }

public SemaphoreSlim SendLock { get; set; }
public SemaphoreSlim WriteLock { get; set; }

#endregion

Expand All @@ -58,7 +58,7 @@ public ClientMetadata(TcpClient tcp)
_IpPort = tcp.Client.RemoteEndPoint.ToString();

ReadLock = new SemaphoreSlim(1);
SendLock = new SemaphoreSlim(1);
WriteLock = new SemaphoreSlim(1);
}

#endregion
Expand Down Expand Up @@ -101,7 +101,7 @@ protected virtual void Dispose(bool disposing)
}

ReadLock.Dispose();
SendLock.Dispose();
WriteLock.Dispose();

_Disposed = true;
}
Expand Down
2 changes: 1 addition & 1 deletion WatsonTcp/Message/WatsonMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ internal WatsonMessage(long contentLength, Stream stream, bool debug)
}

/// <summary>
/// Read from a TCP-based stream and construct a message. Call Build() to populate.
/// Read from a stream and construct a message. Call Build() to populate.
/// </summary>
/// <param name="stream">NetworkStream.</param>
/// <param name="debug">Enable or disable console debugging.</param>
Expand Down
4 changes: 2 additions & 2 deletions WatsonTcp/WatsonTcp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>1.3.11</Version>
<Version>1.3.12</Version>
<Authors>Joel Christner</Authors>
<Company>Joel Christner</Company>
<Description>A simple C# async TCP server and client with integrated framing for reliable transmission and receipt of data</Description>
Expand All @@ -13,7 +13,7 @@
<RepositoryUrl>https://github.com/jchristn/WatsonTcp</RepositoryUrl>
<RepositoryType>Github</RepositoryType>
<PackageLicenseUrl>https://github.com/jchristn/WatsonTcp/blob/master/LICENSE.TXT</PackageLicenseUrl>
<PackageReleaseNotes>More reliable and stable detection of client disconnect.</PackageReleaseNotes>
<PackageReleaseNotes>Reduce instances of calls to GetStream</PackageReleaseNotes>
<PackageIconUrl>https://raw.githubusercontent.com/jchristn/watsontcp/master/assets/watson.ico</PackageIconUrl>
</PropertyGroup>

Expand Down
Loading

0 comments on commit 1b7153f

Please sign in to comment.