#ifndef __DGRAM_MOD_SOCKET_H__ #define __DGRAM_MOD_SOCKET_H__ #ifdef __cplusplus extern "C" { #endif enum socket_mod_t { PULL_PUSH = 1, REQ_REP = 2, PAIR = 3, PUB_SUB = 4, SURVEY = 5, BUS = 6 }; void *dgram_mod_open_socket(int mod); int dgram_mod_close_socket(void * _socket); int dgram_mod_bind(void * _socket, int port); int dgram_mod_sendto(void *_socket, const void *buf, const int size, const int port); int dgram_mod_recvfrom(void *_socket, void **buf, int *size, int *port); int dgram_mod_sendandrecv(void * _socket, const void *send_buf, const int send_size, const int port, void **recv_buf, int *recv_size) ; #ifdef __cplusplus } #endif #endif