Usefull socket functions.
More...
#include <NetworkHelper.h>
Usefull socket functions.
static int sp2plib::NetworkHelper::dataAvailable |
( |
Socket |
sock | ) |
|
|
static |
Gets amount of read data available for socket
- Parameters
-
sock | Socket to get info from. |
- Returns
- Number of available bytes.
static IP4Address sp2plib::NetworkHelper::getBindAddressForRemoteAddress |
( |
char * |
host | ) |
|
|
static |
Gets local address socket will bind to when connecting to remote host
- Parameters
-
- Returns
- The local bind address for host remote address
static IP4Address sp2plib::NetworkHelper::getBindAddressForRemoteAddress |
( |
IP4Address |
RemoteAddress | ) |
|
|
static |
/Gets local address socket will bind to when connecting to remote address
- Parameters
-
RemoteAddress | The remote address. |
- Returns
- The local bind address for remote address.
static bool sp2plib::NetworkHelper::getInterfaceCanTcpAccept |
( |
IP4Address |
localInterfaceAddress | ) |
|
|
static |
Gets value indicating local socket ca do ::accept with given local address, if use provide 0.0.0.0 - ANY or 127.0.0.1 you will alwause get true, point is to check actual address (getting false from this function is good indication that interface is 3g)
- Parameters
-
sock | Local address to check |
- Returns
- True if accept is fuctioning, otherwise false
static IPEndPoint sp2plib::NetworkHelper::getSocketBindingPoint |
( |
Socket & |
sock | ) |
|
|
static |
Gets local end point socket is bound to
- Parameters
-
sock | Socket to get info from |
- Returns
- The socket bind point.
The documentation for this class was generated from the following file: