- Main Page
- Classes
- Files
- Related Pages

# include/nmxp_base.h

Go to the documentation of this file.

    00001
    00014 #ifndef NMXP_BASE_H
    00015 #define NMXP_BASE_H 1
    00016
    00017 #include "nmxp_data.h"
    00018 #include "nmxp_chan.h"
    00019 #include "nmxp_log.h"
    00020
    00022 #define NMXP_SLEEPMAX 60
    00023
    00025 #define NMXP_SOCKET_OK          0
    00026
    00028 #define NMXP_SOCKET_ERROR      -1
    00029
    00030
    00040 int nmxp_openSocket(char *hostname, int portNum, int (*func_cond)(void));
    00041
    00042
    00051 int nmxp_closeSocket(int isock);
    00052
    00053
    00064 int nmxp_send_ctrl(int isock, void *buffer, int length);
    00065
    00066
    00075 int nmxp_setsockopt_RCVTIMEO(int isock, int timeoutsec);
    00076
    00077
    00083 char *nmxp_strerror(int errno_value);
    00084
    00085
    00100 int nmxp_recv_ctrl(int isock, void *buffer, int length, int timeoutsec, int *recv_errno );
    00101
    00102
    00113 int nmxp_sendHeader(int isock, NMXP_MSG_CLIENT type, int32_t length);
    00114
    00115
    00128 int nmxp_receiveHeader(int isock, NMXP_MSG_SERVER *type, int32_t *length, int timeoutsec, int *recv_errno );
    00129
    00130
    00142 int nmxp_sendMessage(int isock, NMXP_MSG_CLIENT type, void *buffer, int32_t length);
    00143
    00144
    00160 int nmxp_receiveMessage(int isock, NMXP_MSG_SERVER *type, void **buffer, int32_t *length, int timeoutsec, int *recv_errno );
    00161
    00162
    00173 NMXP_DATA_PROCESS *nmxp_processCompressedData(char* buffer_data, int length_data, NMXP_CHAN_LIST_NET *channelList, const char *network_code_default);
    00174
    00175
    00186 NMXP_DATA_PROCESS *nmxp_processDecompressedData(char* buffer_data, int length_data, NMXP_CHAN_LIST_NET *channelList, const char *network_code_default);
    00187
    00188
    00196 unsigned int nmxp_sleep(unsigned int sleep_time);
    00197
    00205 unsigned int nmxp_usleep(unsigned int sleep_time);
    00206
    00207 #endif
    00208