Skip to content

Commit 1df5615

Browse files
authored
Merge pull request #921 from dxdjgl/master
Fixed comments and made EndRead and EndWrite symmetric.
2 parents ee93a45 + 3392876 commit 1df5615

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/NetMQ/Core/Transports/StreamEngine.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,14 +1027,14 @@ public void ActivateOut()
10271027
{
10281028
FeedAction(Action.ActivateOut, SocketError.Success, 0);
10291029
}
1030-
1030+
10311031
/// <param name="socketError">the SocketError that resulted from the write - which could be Success (no error at all)</param>
10321032
/// <param name="bytesTransferred">this indicates the number of bytes that were transferred in the write</param>
10331033
/// <returns>the number of bytes transferred if successful, -1 otherwise</returns>
10341034
/// <exception cref="NetMQException">If the socketError is not Success then it must be a valid recoverable error or the number of bytes transferred must be zero.</exception>
10351035
/// <remarks>
10361036
/// If socketError is SocketError.Success and bytesTransferred is > 0, then this returns bytesTransferred.
1037-
/// If bytes is zero, or the socketError is one of NetworkDown, NetworkReset, HostUn, Connection Aborted, TimedOut, or ConnectionReset, - then -1 is returned.
1037+
/// If bytes is zero, or the socketError is one of NetworkDown, NetworkReset, HostUn, Connection Aborted, TimedOut, ConnectionReset, AccessDenied, or Shutdown, - then -1 is returned.
10381038
/// Otherwise, a NetMQException is thrown.
10391039
/// </remarks>
10401040
private static int EndWrite(SocketError socketError, int bytesTransferred)
@@ -1074,7 +1074,7 @@ private void BeginWrite([NotNull] ByteArraySegment data, int size)
10741074
/// <exception cref="NetMQException">If the socketError is not Success then it must be a valid recoverable error or the number of bytes transferred must be zero.</exception>
10751075
/// <remarks>
10761076
/// If socketError is SocketError.Success and bytesTransferred is > 0, then this returns bytesTransferred.
1077-
/// If bytes is zero, or the socketError is one of NetworkDown, NetworkReset, HostUn, Connection Aborted, TimedOut, or ConnectionReset, - then -1 is returned.
1077+
/// If bytes is zero, or the socketError is one of NetworkDown, NetworkReset, HostUn, Connection Aborted, TimedOut, ConnectionReset, AccessDenied, or Shutdown, - then -1 is returned.
10781078
/// Otherwise, a NetMQException is thrown.
10791079
/// </remarks>
10801080
private static int EndRead(SocketError socketError, int bytesTransferred)
@@ -1089,7 +1089,8 @@ private static int EndRead(SocketError socketError, int bytesTransferred)
10891089
socketError == SocketError.ConnectionAborted ||
10901090
socketError == SocketError.TimedOut ||
10911091
socketError == SocketError.ConnectionReset ||
1092-
socketError == SocketError.AccessDenied)
1092+
socketError == SocketError.AccessDenied ||
1093+
socketError == SocketError.Shutdown)
10931094
return -1;
10941095

10951096
throw NetMQException.Create(socketError);

0 commit comments

Comments
 (0)