ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
mirror_socket.c File Reference

Go to the source code of this file.

Functions

bool socket_is_valid (socket_t sock)
int socket_close (socket_t)
int socket_shutdown (socket_t, int)
ssize_t socket_send (socket_t, const void *, size_t, int)
ssize_t socket_recv (socket_t, void *, size_t, int)
int socket_poll (struct pollfd *, nfds_t, int64_t)
bool socket_is_would_block_error (int)
bool socket_is_invalid_socket_error (int)
const char * socket_get_error_string (void)
int socket_get_last_error (void)
bool platform_is_interactive (void)

Function Documentation

◆ platform_is_interactive()

bool platform_is_interactive ( void )

Definition at line 44 of file mirror_socket.c.

44 {
45 return false;
46}

Referenced by ui_input_password().

◆ socket_close()

int socket_close ( socket_t )

◆ socket_get_error_string()

const char * socket_get_error_string ( void )

Definition at line 36 of file mirror_socket.c.

36 {
37 return "Socket error";
38}

Referenced by accept_with_timeout(), and network_error_string().

◆ socket_get_last_error()

int socket_get_last_error ( void )

Definition at line 40 of file mirror_socket.c.

40 {
41 return 0;
42}

Referenced by accept_with_timeout(), connect_with_timeout(), and quic_udp_pump().

◆ socket_is_invalid_socket_error()

bool socket_is_invalid_socket_error ( int )

Definition at line 32 of file mirror_socket.c.

32 {
33 return false;
34}

Referenced by accept_with_timeout().

◆ socket_is_valid()

bool socket_is_valid ( socket_t sock)

Definition at line 4 of file mirror_socket.c.

4 {
5 return sock >= 0;
6}

◆ socket_is_would_block_error()

bool socket_is_would_block_error ( int )

Definition at line 28 of file mirror_socket.c.

28 {
29 return false;
30}

Referenced by connect_with_timeout(), and quic_udp_pump().

◆ socket_poll()

int socket_poll ( struct pollfd * ,
nfds_t ,
int64_t  )

Definition at line 24 of file mirror_socket.c.

24 {
25 return 0;
26}

Referenced by accept_with_timeout(), asciichat_mdns_update(), quic_udp_wait(), recv_with_timeout(), and send_with_timeout().

◆ socket_recv()

ssize_t socket_recv ( socket_t ,
void * ,
size_t ,
int  )

Definition at line 20 of file mirror_socket.c.

20 {
21 return -1;
22}

Referenced by recv_with_timeout().

◆ socket_send()

ssize_t socket_send ( socket_t ,
const void * ,
size_t ,
int  )

Definition at line 16 of file mirror_socket.c.

16 {
17 return -1;
18}

Referenced by send_with_timeout().

◆ socket_shutdown()

int socket_shutdown ( socket_t ,
int  )

Definition at line 12 of file mirror_socket.c.

12 {
13 return 0;
14}