ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
platform/wasm/stubs/network.c
Go to the documentation of this file.
1
7#include <stdio.h>
9
10asciichat_error_t platform_popen(const char *name, const char *command, const char *mode, FILE **out_stream) {
11 (void)name;
12 (void)command;
13 (void)mode;
14 (void)out_stream;
15 return SET_ERRNO(ERROR_NOT_SUPPORTED, "platform_popen not supported in WASM");
16}
17
19 (void)stream_ptr;
20 return SET_ERRNO(ERROR_NOT_SUPPORTED, "platform_pclose not supported in WASM");
21}
22
23int platform_execute_subprocess(const char *executable, const char **argv, char *output_buffer, size_t output_size) {
24 (void)executable;
25 (void)argv;
26 (void)output_buffer;
27 (void)output_size;
28 return -1; // No subprocess support in WASM
29}
30
31// Opaque forward declarations
35
37 (void)client;
38 // No-op - websocket client not used in WASM mirror mode
39}
40
42 (void)client;
43 // No-op - TCP client not used in WASM mirror mode
44}
45
47 return NULL; // No app callbacks in WASM
48}
49
51typedef void app_client_t;
53
55 (void)callbacks;
56}
57
59 return NULL;
60}
61
63 (void)client;
64}
65
67 (void)ctx;
68 return SET_ERRNO(ERROR_NOT_SUPPORTED, "connection_context_init not supported in WASM");
69}
70
74
76 return NULL;
77}
⚠️‼️ Comprehensive thread-local error context system for ascii-chat
void tcp_client_t
#define SET_ERRNO(code, context_msg,...)
Set error code with custom context message and log it, returning the error code.
asciichat_error_t
Error and exit codes - unified status values (0-255)
Definition error_codes.h:49
@ ERROR_NOT_SUPPORTED
Definition error_codes.h:74
asciichat_error_t platform_popen(const char *name, const char *command, const char *mode, FILE **out_stream)
Execute a command and return a file stream for reading/writing.
int platform_execute_subprocess(const char *executable, const char **argv, char *output_buffer, size_t output_size)
Execute a subprocess and optionally capture its output.
asciichat_error_t platform_pclose(FILE **stream_ptr)
Close a process stream opened with platform_popen()
app_callbacks_t * app_callbacks_get(void)
tcp_client_t * tcp_client_create(void)
Create and initialize a TCP client instance.
void websocket_client_destroy(websocket_client_t *client)
asciichat_error_t connection_context_init(connection_attempt_context_t *ctx)
Initialize connection attempt context.
void app_callbacks_register(app_callbacks_reg_t *callbacks)
void connection_context_cleanup(connection_attempt_context_t *ctx)
Cleanup connection attempt context.
void app_client_destroy(app_client_t *client)
void tcp_client_destroy(tcp_client_t *client)
void connection_attempt_context_t
struct websocket_client_t websocket_client_t
void app_callbacks_reg_t
app_client_t * app_client_create(void)
Create and initialize client application context.
Context for connection attempts (TCP or WebSocket)