|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
🌐 Common socket utility functions (cross-platform implementations) More...
Go to the source code of this file.
Functions | |
| void | socket_optimize_for_streaming (socket_t sock) |
| Optimize socket for high-throughput video streaming. | |
| int | socket_set_timeout (socket_t sock, uint64_t timeout_ns) |
| Set socket receive and send timeouts. | |
🌐 Common socket utility functions (cross-platform implementations)
Definition in file socket.c.
| void socket_optimize_for_streaming | ( | socket_t | sock | ) |
Optimize socket for high-throughput video streaming.
Consolidates socket configuration for real-time video streaming:
This common implementation applies to both POSIX and Windows platforms.
| sock | Socket to configure |
Definition at line 37 of file socket.c.
| int socket_set_timeout | ( | socket_t | sock, |
| uint64_t | timeout_ns | ||
| ) |
Set socket receive and send timeouts.
| sock | Socket to configure |
| timeout_ms | Timeout in milliseconds |
Cross-platform implementation that sets both SO_RCVTIMEO and SO_SNDTIMEO. Platform-specific socket_setsockopt() handles the differences between Windows (DWORD milliseconds) and POSIX (struct timeval).
Definition at line 82 of file socket.c.
Referenced by discovery_session_process(), and nat_measure_bandwidth().