37 namespace rp {
namespace standalone{
namespace rplidar {
45 bool bind(
const char * ipStr, uint32_t port)
53 _binded_socket = NULL;
55 bool waitfordata(
size_t data_count,
_u32 timeout = -1,
size_t * returned_size = NULL)
58 *returned_size = data_count;
63 return _binded_socket->
send(data, size) ;
68 _binded_socket->
recv(data, size, lenRec);
81 virtual void disconnect();
bool bind(const char *ipStr, uint32_t port)
int recvdata(unsigned char *data, size_t size)
bool waitfordata(size_t data_count, _u32 timeout=-1, size_t *returned_size=NULL)
int senddata(const _u8 *data, size_t size)
virtual u_result send(const void *buffer, size_t len)=0
virtual u_result waitforData(_u32 timeout=DEFAULT_SOCKET_TIMEOUT)=0
virtual u_result recv(void *buf, size_t len, size_t &recv_len)=0
virtual u_result connect(const SocketAddress &pairAddress)=0
rp::net::StreamSocket * _binded_socket