Skip to content

Commit 1b7153f

Browse files
author
Joel Christner
committed
NuGet v1.3.12, reduce calls to GetStream()
1 parent 323fb8d commit 1b7153f

File tree

5 files changed

+115
-93
lines changed

5 files changed

+115
-93
lines changed

WatsonTcp/ClientMetadata.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public string IpPort
3434

3535
public SemaphoreSlim ReadLock { get; set; }
3636

37-
public SemaphoreSlim SendLock { get; set; }
37+
public SemaphoreSlim WriteLock { get; set; }
3838

3939
#endregion
4040

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

6060
ReadLock = new SemaphoreSlim(1);
61-
SendLock = new SemaphoreSlim(1);
61+
WriteLock = new SemaphoreSlim(1);
6262
}
6363

6464
#endregion
@@ -101,7 +101,7 @@ protected virtual void Dispose(bool disposing)
101101
}
102102

103103
ReadLock.Dispose();
104-
SendLock.Dispose();
104+
WriteLock.Dispose();
105105

106106
_Disposed = true;
107107
}

WatsonTcp/Message/WatsonMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ internal WatsonMessage(long contentLength, Stream stream, bool debug)
174174
}
175175

176176
/// <summary>
177-
/// Read from a TCP-based stream and construct a message. Call Build() to populate.
177+
/// Read from a stream and construct a message. Call Build() to populate.
178178
/// </summary>
179179
/// <param name="stream">NetworkStream.</param>
180180
/// <param name="debug">Enable or disable console debugging.</param>

WatsonTcp/WatsonTcp.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6-
<Version>1.3.11</Version>
6+
<Version>1.3.12</Version>
77
<Authors>Joel Christner</Authors>
88
<Company>Joel Christner</Company>
99
<Description>A simple C# async TCP server and client with integrated framing for reliable transmission and receipt of data</Description>
@@ -13,7 +13,7 @@
1313
<RepositoryUrl>https://github.com/jchristn/WatsonTcp</RepositoryUrl>
1414
<RepositoryType>Github</RepositoryType>
1515
<PackageLicenseUrl>https://github.com/jchristn/WatsonTcp/blob/master/LICENSE.TXT</PackageLicenseUrl>
16-
<PackageReleaseNotes>More reliable and stable detection of client disconnect.</PackageReleaseNotes>
16+
<PackageReleaseNotes>Reduce instances of calls to GetStream</PackageReleaseNotes>
1717
<PackageIconUrl>https://raw.githubusercontent.com/jchristn/watsontcp/master/assets/watson.ico</PackageIconUrl>
1818
</PropertyGroup>
1919

0 commit comments

Comments
 (0)