19 #ifndef _MODBUS_TCP_H_ 20 #define _MODBUS_TCP_H_ 26 #if defined(_WIN32) && !defined(__CYGWIN__) 29 #define ECONNRESET WSAECONNRESET 30 #define ECONNREFUSED WSAECONNREFUSED 31 #define ETIMEDOUT WSAETIMEDOUT 32 #define ENOPROTOOPT WSAENOPROTOOPT 35 #define MODBUS_TCP_DEFAULT_PORT 502 36 #define MODBUS_TCP_SLAVE 0xFF 41 #define MODBUS_TCP_MAX_ADU_LENGTH 260
#define MODBUS_BEGIN_DECLS
int modbus_tcp_accept(modbus_t *ctx, int *socket)
int modbus_tcp_pi_accept(modbus_t *ctx, int *socket)
int modbus_tcp_listen(modbus_t *ctx, int nb_connection)
int modbus_tcp_pi_listen(modbus_t *ctx, int nb_connection)
modbus_t * modbus_new_tcp_pi(const char *node, const char *service)
modbus_t * modbus_new_tcp(const char *ip_address, int port)