|
SVCS - English Documentation
|
Platform abstraction layer. More...
Typedefs | |
| typedef int | SocketHandle |
Functions | |
| bool | initializeNetwork () |
| Initialize network subsystem (Windows only) | |
| void | cleanupNetwork () |
| Cleanup network subsystem (Windows only) | |
| SocketHandle | createServerSocket (const std::string &host, uint16_t port) |
| Create server socket. | |
| void | closeSocket (SocketHandle sock) |
| Close socket. | |
| bool | setSocketNonBlocking (SocketHandle sock) |
| Set socket non-blocking. | |
| std::string | getClientIpFromSocket (SocketHandle sock) |
| Get client IP from socket. | |
| SocketHandle | acceptConnection (SocketHandle serverSocket) |
| Accept a connection on a socket. | |
Platform abstraction layer.
This namespace contains cross-platform wrappers for operating system functionality, allowing the code to work seamlessly on Windows, Linux, macOS, and other POSIX systems.
Platform abstraction layer This namespace contains cross-platform wrappers for operating system functionality, allowing the code to work seamlessly on Windows, Linux, macOS, and other POSIX systems.
| SocketHandle svcs::platform::acceptConnection | ( | SocketHandle | serverSocket | ) |
Accept a connection on a socket.
| serverSocket | Server socket handle |
| void svcs::platform::closeSocket | ( | SocketHandle | sock | ) |
Close socket.
| sock | Socket handle to close |
| SocketHandle svcs::platform::createServerSocket | ( | const std::string & | host, |
| uint16_t | port ) |
Create server socket.
| host | Host address to bind to (empty string for any) |
| port | Port to bind to |
| std::string svcs::platform::getClientIpFromSocket | ( | SocketHandle | sock | ) |
Get client IP from socket.
| sock | Socket handle |
| bool svcs::platform::initializeNetwork | ( | ) |
Initialize network subsystem (Windows only)
| bool svcs::platform::setSocketNonBlocking | ( | SocketHandle | sock | ) |
Set socket non-blocking.
| sock | Socket handle |