/// <summary> /// Closes all connections which are bound to this object. /// </summary> /// <param name="closeReason">The close reason.</param> /// <param name="callCloseEvent">If the instance should call the connectionLost event.</param> public void Shutdown(CloseReason closeReason, bool callCloseEvent = false) { if (IsAlive_TCP) { tcpConnection.Close(closeReason, callCloseEvent); } if (IsAlive_UDP) { udpConnection.Close(closeReason, callCloseEvent); } }
/// <summary> /// Closes all connections which are bound to this object. /// </summary> /// <param name="closeReason">The close reason.</param> /// <param name="callCloseEvent">If the instance should call the connectionLost event.</param> public void Shutdown(CloseReason closeReason, bool callCloseEvent = false) { tcpConnection.Close(closeReason, callCloseEvent); udpConnection.Close(closeReason, callCloseEvent); }