![]() |
jsocketpp 1.0
A cross-platform C++20 socket library.
|
Exception class for socket operations that time out. More...
#include <SocketTimeoutException.hpp>


Public Member Functions | |
| SocketTimeoutException (const int errorCode=JSOCKETPP_TIMEOUT_CODE, std::string message="") | |
| Construct a new SocketTimeoutException with the specified or default timeout code and message. | |
| Public Member Functions inherited from jsocketpp::SocketException | |
| SocketException (const std::string &message="SocketException") | |
| Constructs a SocketException with a custom error message and no associated error code. | |
| SocketException (const int code, const std::string &message="SocketException") | |
| Constructs a SocketException with a platform-specific error code and custom message. | |
| SocketException (const std::string &message, std::exception_ptr nested) | |
| Constructs a SocketException with a message and a nested exception. | |
| int | getErrorCode () const noexcept |
| Retrieves the platform-specific error code associated with this exception. | |
| std::exception_ptr | getNestedException () const noexcept |
| Retrieves the nested exception captured at construction time, if any. | |
| ~SocketException () override=default | |
| Destroys the SocketException. | |
Exception class for socket operations that time out.
This exception is thrown when a socket operation (such as accept(), read(), or connect()) exceeds its allotted timeout period without completing. It provides a platform-appropriate error code and a human-readable message.
Inherits from SocketException and uses a default platform-specific error code:
The default message is generated using SocketErrorMessage for the given timeout error code.
|
inlineexplicit |
Construct a new SocketTimeoutException with the specified or default timeout code and message.
| errorCode | The platform-specific timeout code (default: JSOCKETPP_TIMEOUT_CODE). |
| message | Optional error message. If omitted, it will be generated from the error code. |