| | |
| | | #ifndef __MOD_SOCKET_H__ |
| | | #define __MOD_SOCKET_H__ |
| | | |
| | | #include "shm_socket.h" |
| | | |
| | | #ifdef __cplusplus |
| | | extern "C" { |
| | | #endif |
| | | |
| | | enum shm_mod_t |
| | | enum socket_mod_t |
| | | { |
| | | PULL_PUSH = 1, |
| | | REQ_REP = 2, |
| | |
| | | }; |
| | | |
| | | |
| | | void *mod_open_socket(int mod); |
| | | |
| | | int mod_close_socket(void * _socket); |
| | | |
| | | int mod_socket_bind(void * _socket, int port); |
| | | |
| | | |
| | | int mod_listen(void * _socket); |
| | | |
| | | |
| | | int mod_connect(void * _socket, int port); |
| | | |
| | | int mod_send(void * _socket, const void *buf, const int size); |
| | | |
| | | int mod_recv(void * _socket, void **buf, int *size) ; |
| | | |
| | | void mod_free(void *buf); |
| | | |
| | | #ifdef __cplusplus |
| | | } |