34 #ifndef _ART_DTRACKNET_H_ 35 #define _ART_DTRACKNET_H_ 39 struct _ip_socket_struct;
58 unsigned int ip_name2ip(
const char* name);
74 UDP(
unsigned short port,
unsigned int multicastIp = 0 );
112 int receive(
void *buffer,
int maxLen,
int toutUs );
124 int send(
const void* buffer,
int len,
unsigned int ip,
unsigned short port,
int toutUs );
130 unsigned short m_port;
131 unsigned int m_multicastIp;
132 unsigned int m_remoteIp;
149 TCP(
unsigned int ip,
unsigned short port );
169 int receive(
void *buffer,
int maxLen,
int toutUs );
179 int send(
const void* buffer,
int len,
int toutUs );
190 #endif // _ART_DTRACKNET_H_ int send(const void *buffer, int len, unsigned int ip, unsigned short port, int toutUs)
Send UDP data.
unsigned short getPort()
Get UDP data port where data is received.
~TCP()
Deinitialize TCP socket.
int receive(void *buffer, int maxLen, int toutUs)
Receive TCP data.
int receive(void *buffer, int maxLen, int toutUs)
Receive UDP data.
unsigned int getRemoteIp()
Get IP address of sender of latest received data.
TCP(unsigned int ip, unsigned short port)
Initialize client TCP socket.
bool isValid()
Returns if UDP socket is open to receive data.
int send(const void *buffer, int len, int toutUs)
Send TCP data.
bool isValid()
Returns if TCP connection is active.
UDP(unsigned short port, unsigned int multicastIp=0)
Initialize UDP socket.
~UDP()
Deinitialize UDP socket.