Net Struct Reference#include <platformNet.h>
List of all members.
Detailed Description
Platform-specific network operations.
|
Public Types |
| NoError |
| WrongProtocolType |
| InvalidPacketProtocol |
| WouldBlock |
| NotASocket |
| UnknownError |
| DNSResolved |
| DNSFailed |
| Connected |
| ConnectFailed |
| Disconnected |
| UDPProtocol |
| TCPProtocol |
enum | Error {
NoError,
WrongProtocolType,
InvalidPacketProtocol,
WouldBlock,
NotASocket,
UnknownError
} |
enum | ConnectionState {
DNSResolved,
DNSFailed,
Connected,
ConnectFailed,
Disconnected
} |
enum | Protocol {
UDPProtocol,
TCPProtocol
} |
Static Public Member Functions |
static bool | init () |
static void | shutdown () |
static bool | openPort (S32 connectPort, bool doBind=true) |
static NetSocket | getPort () |
static void | closePort () |
static Error | sendto (const NetAddress *address, const U8 *buffer, S32 bufferSize) |
static NetSocket | openListenPort (U16 port) |
static NetSocket | openConnectTo (const char *stringAddress) |
static void | closeConnectTo (NetSocket socket) |
static Error | sendtoSocket (NetSocket socket, const U8 *buffer, S32 bufferSize) |
static bool | compareAddresses (const NetAddress *a1, const NetAddress *a2) |
static bool | stringToAddress (const char *addressString, NetAddress *address) |
static void | addressToString (const NetAddress *address, char addressString[256]) |
static NetSocket | openSocket () |
static Error | closeSocket (NetSocket socket) |
static Error | send (NetSocket socket, const U8 *buffer, S32 bufferSize) |
static Error | recv (NetSocket socket, U8 *buffer, S32 bufferSize, S32 *bytesRead) |
static Error | connect (NetSocket socket, const NetAddress *address) |
static Error | listen (NetSocket socket, S32 maxConcurrentListens) |
static NetSocket | accept (NetSocket acceptSocket, NetAddress *remoteAddress) |
static Error | bind (NetSocket socket, U16 port) |
static Error | setBufferSize (NetSocket socket, S32 bufferSize) |
static Error | setBroadcast (NetSocket socket, bool broadcastEnable) |
static Error | setBlocking (NetSocket socket, bool blockingIO) |
Static Public Attributes |
static const int | MaxPacketDataSize = MAXPACKETSIZE |
static ConnectionNotifyEvent | smConnectionNotify |
static ConnectionAcceptedEvent | smConnectionAccept |
static ConnectionReceiveEvent | smConnectionReceive |
static PacketReceiveEvent | smPacketReceive |
Static Private Member Functions |
static void | process () |
Member Enumeration Documentation
- Enumerator:
-
NoError |
|
WrongProtocolType |
|
InvalidPacketProtocol |
|
WouldBlock |
|
NotASocket |
|
UnknownError |
|
- Enumerator:
-
DNSResolved |
|
DNSFailed |
|
Connected |
|
ConnectFailed |
|
Disconnected |
|
Member Function Documentation
static bool Net::init |
( |
|
) |
[static] |
static void Net::shutdown |
( |
|
) |
[static] |
static bool Net::openPort |
( |
S32 |
connectPort, |
|
|
bool |
doBind = true | |
|
) |
| | [static] |
static void Net::closePort |
( |
|
) |
[static] |
static NetSocket Net::openConnectTo |
( |
const char * |
stringAddress |
) |
[static] |
static Error Net::sendtoSocket |
( |
NetSocket |
socket, |
|
|
const U8 * |
buffer, |
|
|
S32 |
bufferSize | |
|
) |
| | [static] |
static bool Net::stringToAddress |
( |
const char * |
addressString, |
|
|
NetAddress * |
address | |
|
) |
| | [static] |
static void Net::addressToString |
( |
const NetAddress * |
address, |
|
|
char |
addressString[256] | |
|
) |
| | [static] |
static NetSocket Net::openSocket |
( |
|
) |
[static] |
static void Net::process |
( |
|
) |
[static, private] |
Member Data Documentation
|