DTrackSDK  v2.9.0
Public Member Functions | List of all members
DTrackNet::TCP Class Reference

Handling TCP data. More...

#include <DTrackNet.hpp>

Public Member Functions

 TCP (unsigned int ip, unsigned short port)
 Initialize client TCP socket. More...
 
 ~TCP ()
 Deinitialize TCP socket.
 
bool isValid ()
 Returns if TCP connection is active.
 
int receive (void *buffer, int maxLen, int toutUs)
 Receive TCP data. More...
 
int send (const void *buffer, int len, int toutUs)
 Send TCP data. More...
 

Detailed Description

Handling TCP data.

Definition at line 139 of file DTrackNet.hpp.

Constructor & Destructor Documentation

◆ TCP()

DTrackNet::TCP::TCP ( unsigned int  ip,
unsigned short  port 
)

Initialize client TCP socket.

Parameters
[in]ipIP address of TCP server
[in]portPort number of TCP server

Definition at line 394 of file DTrackNet.cpp.

Member Function Documentation

◆ receive()

int DTrackNet::TCP::receive ( void *  buffer,
int  maxLen,
int  toutUs 
)

Receive TCP data.

Parameters
[out]bufferBuffer for TCP data
[in]maxLenLength of buffer
[in]toutUsTimeout in us (micro seconds)
Returns
Number of received bytes, <0 if error/timeout occured, -9 broken connection

Definition at line 461 of file DTrackNet.cpp.

Referenced by DTrackSDK::sendDTrack2Command().

◆ send()

int DTrackNet::TCP::send ( const void *  buffer,
int  len,
int  toutUs 
)

Send TCP data.

Parameters
[in]bufferBuffer for TCP data
[in]lenLength of buffer
[in]toutUsTimeout in us (micro seconds)
Returns
0 if ok, <0 if error/timeout occured

Definition at line 505 of file DTrackNet.cpp.

Referenced by DTrackSDK::sendDTrack2Command().


The documentation for this class was generated from the following files: