ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
network.c File Reference

🌐 Cross-platform socket I/O with timeout management and connection handling More...

Go to the source code of this file.

Functions

ssize_t send_with_timeout (socket_t sockfd, const void *data, size_t len, int timeout_seconds)
 Send data with timeout using chunked transmission.
 
ssize_t recv_with_timeout (socket_t sockfd, void *buf, size_t len, int timeout_seconds)
 Receive data with timeout.
 
int accept_with_timeout (socket_t listenfd, struct sockaddr *addr, socklen_t *addrlen, int timeout_seconds)
 Accept connection with timeout.
 
asciichat_error_t set_socket_timeout (socket_t sockfd, int timeout_seconds)
 Set socket timeout.
 
asciichat_error_t set_socket_keepalive (socket_t sockfd)
 Set socket keepalive.
 
asciichat_error_t set_socket_nonblocking (socket_t sockfd)
 Set socket non-blocking.
 
asciichat_error_t socket_configure_buffers (socket_t sockfd)
 Configure socket buffers and TCP_NODELAY for optimal performance.
 
const char * network_error_string ()
 Get human-readable error string for network errors.
 
bool connect_with_timeout (socket_t sockfd, const struct sockaddr *addr, socklen_t addrlen, int timeout_seconds)
 Connect with timeout.
 

Detailed Description

🌐 Cross-platform socket I/O with timeout management and connection handling

Definition in file network.c.