26 lines
781 B
C
26 lines
781 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
int runt_socket_create();
|
|
void runt_socket_close(int socket_id);
|
|
void runt_socket_set_blocking(int socket_id, bool blocking);
|
|
bool runt_socket_select(int socket_id, double timeout_sec);
|
|
bool runt_socket_is_connected(int socket_id);
|
|
bool runt_socket_bind(int socket_id, const char* address, int port);
|
|
bool runt_socket_listen(int socket_id, int backlog);
|
|
int runt_socket_accept(int socket_id);
|
|
bool runt_socket_connect(int socket_id, const char* hostname, int port);
|
|
int runt_socket_send(int socket_id, const char* data, int length);
|
|
int runt_socket_recv(int socket_id, int max_length, char** out_data);
|
|
#ifdef WITH_SSL
|
|
bool runt_socket_enable_ssl(int socket_id);
|
|
#endif
|
|
void runt_socket_cleanup();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|