/// <summary> /// Signals that the connection to the server was lost. /// </summary> public void ConnectionLost() { _result = SocketReadResult.ConnectionLost; _socketReadComplete.Set(); }
/// <summary> /// Signals that the socket read failed. /// </summary> /// <param name="cause">The <see cref="Exception"/> that caused the read to fail.</param> public void Fail(Exception cause) { Exception = cause; _result = SocketReadResult.Failed; _socketReadComplete.Set(); }
/// <summary> /// Signals that the total number of bytes has been read successfully. /// </summary> public void Complete() { _result = SocketReadResult.Complete; _socketReadComplete.Set(); }
/// <summary> /// Signals that the connection to the server was lost. /// </summary> public void ConnectionLost() { _result = SocketReadResult.ConnectionLost; _socketReadComplete.Set(); }
/// <summary> /// Signals that the socket read failed. /// </summary> /// <param name="cause">The <see cref="Exception"/> that caused the read to fail.</param> public void Fail(Exception cause) { Exception = cause; _result = SocketReadResult.Failed; _socketReadComplete.Set(); }
/// <summary> /// Signals that the total number of bytes has been read successfully. /// </summary> public void Complete() { _result = SocketReadResult.Complete; _socketReadComplete.Set(); }