RtfwStopTCPIPStack
RtfwStopTCPIPStack stops the RT-TCP/IP Stack.
Syntax
bool RtfwStopTCPIPStack( unsigned int timeout );
Parameters
timeout
Specifies the amount of time (in seconds) this function will wait for the Stack to stop. If this value is zero, an appropriate timeout is computed dynamically based on the number of enabled NAL and TCP/IP Stack interfaces.
Return Value
The function returns true if it succeeds. Otherwise, it returns false. Call GetLastError for additional error information.
Possible error codes:
Error Code | Meaning |
---|---|
RT_ERROR_NETWORK_NOT_STARTED | The RT-TCP/IP Stack is not started. |
RT_ERROR_NETWORK_CLIENTS_EXIST | The RT-TCP/IP Stack cannot be stopped, because one or more stack client processes are still running. |
RT_ERROR_NETWORK_STOP_TIMEOUT | A timeout occurred waiting for the RT-TCP/IP Stack to stop. |
RT_ERROR_NETWORK_STARTSTOP_LOCK_FAILURE | Failed to obtain the lock to serialize starting/stopping the RTX64 Subsystem. |
Remarks
If the Stack does not stop within the specified timeout period, this function fails and sets the last error value to RT_ERROR_NETWORK_STOP_TIMEOUT. Use RtfwGetTCPIPStatus to query the status of the RT-TCP/IP Stack.
Requirements
Minimum Required Version | RTX64 4.0 |
Header | RtfwAPI.h |
Library | RtfwAPI.lib |
See Also: