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

Go to the source code of this file.

Functions

acip_transport_tacip_websocket_transport_create (socket_t sockfd, crypto_context_t *crypto_ctx)
 Create WebSocket transport from existing socket.
 

Function Documentation

◆ acip_websocket_transport_create()

acip_transport_t * acip_websocket_transport_create ( socket_t  sockfd,
crypto_context_t crypto_ctx 
)

Create WebSocket transport from existing socket.

Parameters
sockfdConnected socket descriptor (after WebSocket handshake)
crypto_ctxOptional crypto context (may be NULL)
Returns
Transport instance or NULL on error
Note
Socket must have completed WebSocket handshake
Caller retains socket ownership

Definition at line 32 of file websocket/transport.c.

32 {
33 (void)sockfd;
34 (void)crypto_ctx;
35
36 log_error("WebSocket transport not yet implemented");
37 SET_ERRNO(ERROR_INTERNAL, "WebSocket transport is not yet implemented");
38
39 return NULL;
40}
#define SET_ERRNO(code, context_msg,...)
Set error code with custom context message and log it.
@ ERROR_INTERNAL
Definition error_codes.h:84
#define log_error(...)
Log an ERROR message.

References ERROR_INTERNAL, log_error, and SET_ERRNO.