| | |
| | | #define __shm_stream_mod_socket_SOCKET_H__ |
| | | |
| | | |
| | | #ifdef __cplusplus |
| | | extern "C" { |
| | | #endif |
| | | |
| | | |
| | | enum socket_mod_t |
| | | { |
| | |
| | | * 绑定端口到socket, 如果不绑定则系统自动分配一个 |
| | | * @return 0 成功, 其他值 失败的错误码 |
| | | */ |
| | | int shm_stream_mod_socket_bind(void * _socket, int port); |
| | | int shm_stream_mod_socket_bind(void * _socket, int key); |
| | | |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 客户端发起连接请求 |
| | | */ |
| | | int shm_stream_mod_socket_connect(void * _socket, int port); |
| | | int shm_stream_mod_socket_connect(void * _socket, int key); |
| | | |
| | | /** |
| | | * 发送信息 |
| | |
| | | /** |
| | | * 获取soket端口号 |
| | | */ |
| | | int shm_stream_mod_socket_get_port(void * _socket); |
| | | int shm_stream_mod_socket_get_key(void * _socket); |
| | | |
| | | #ifdef __cplusplus |
| | | } |
| | | #endif |
| | | |
| | | |
| | | #endif |