28#include <psputility.h>
29#include <netinet/in.h>
37#define TRI_SOCKET_TCP SOCK_STREAM
38#define TRI_SOCKET_UDP SOCK_DGRAM
43#define TRI_MAX_CLIENTS 256
triSocket triNetSocketCreate(void)
Create a socket.
triVoid triNetDisconnect()
Disconnect from an access point.
triVoid triNetSocketSetClear(triSocketSet *set)
Clear a socket set.
triVoid triNetGetUrl(triChar *url, triChar *response)
Save web 'item' (page/file etc)
triBool triNetInit()
Initialise the wifi.
triSInt triNetSocketReceive(triSocket socket, char *data)
Receive data using a socket.
triSocket triNetSocketAccept(triSocket socket)
Accept a new connection.
triChar * triNetResolveHost(triChar *hostname)
Resolve a host name to an IP.
triVoid triNetSocketClose(triSocket socket)
Close a socket.
triBool triNetConnect(triNetConfig *config)
Connect to an access point.
int triSocket
A socket.
Definition triNet.h:57
triSInt triNetSocketSelect(triUInt maxSockets, triSocketSet *set)
Remove a socket from a socket set.
fd_set triSocketSet
A socket set (group)
Definition triNet.h:62
triVoid triNetSocketSetRemove(triSocket socket, triSocketSet *set)
Remove a socket from a socket set.
triBool triNetSocketConnect(triSocket socket, char *ip, triU16 port)
Connect using a socket.
triBool triNetGetLocalIp(char *buffer)
Get local IP.
triVoid triNetSocketSetAdd(triSocket socket, triSocketSet *set)
Add a socket to a socket set.
triBool triNetIsConnected()
Check connected to an access point.
triBool triNetSocketSetIsMember(triSocket socket, triSocketSet *set)
Check for socket updates within a set.
triBool triNetSocketListen(triSocket socket, triUInt maxConnections)
Listen on a socket for incoming connections.
triSInt triNetSocketSend(triSocket socket, const char *data, triSInt length)
Send data using a socket.
triBool triNetSwitchStatus()
Get the status of the wlan switch.
triUInt triNetGetConfigs(triNetConfig *configs, triUInt count)
Get the connection configs.
triBool triNetSocketBind(triSocket socket, triU16 port)
Bind a socket to an address/port.
Connection config.
Definition triNet.h:49
triUInt index
Connection index.
Definition triNet.h:50
netData name
Connection name.
Definition triNet.h:51