Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of libMiMic by
TcpSocket Class Reference
Tcp Socket Class. More...
#include <TcpSocket.h>
Public Member Functions | |
NyLPC_TiTcpSocket_t * | refBaseInstance () |
wrapped base LPC class. | |
bool | connect (const IpAddr &i_addr, unsigned short i_port, unsigned int timeout=5 *1000) |
int | precv (const void *&i_rx, unsigned int timeout=5 *1000) |
This function return recieved data and size. | |
bool | canRecv () |
true if precv has data. | |
void | pseek (unsigned short i_rx_seek) |
This function seek rx pointer to next. |
Detailed Description
Tcp Socket Class.
The class is used by Net constructor.
Definition at line 15 of file TcpSocket.h.
Member Function Documentation
bool canRecv | ( | ) |
true if precv has data.
This can avoid the block of precv.
Definition at line 41 of file TcpSocket.cpp.
bool connect | ( | const IpAddr & | i_addr, |
unsigned short | i_port, | ||
unsigned int | timeout = 5*1000 |
||
) |
- Parameters:
-
i_host_addr must be IPv4 address format.
Definition at line 23 of file TcpSocket.cpp.
int precv | ( | const void *& | i_rx, |
unsigned int | timeout = 5*1000 |
||
) |
This function return recieved data and size.
The function sets the head of the readable buffer which can always be read. A position is not changed until pseek was called.
- Parameters:
-
i_rx address of variable which accepts received data pointer. n<-1 Error n==0 Timeout (connection still established) n>0 Success. readable data size in i_rx.
Definition at line 46 of file TcpSocket.cpp.
void pseek | ( | unsigned short | i_rx_seek ) |
This function seek rx pointer to next.
- Parameters:
-
i_rx_size seek size. Must be returned value which is small or equal by the precv.
Definition at line 54 of file TcpSocket.cpp.
NyLPC_TiTcpSocket_t* refBaseInstance | ( | ) |
wrapped base LPC class.
Definition at line 21 of file TcpSocket.h.
Generated on Tue Jul 12 2022 16:23:00 by
