Net
Engine/source/platform/platformNet.h
Platform-specific network operations.
Public Types
enum
ConnectionState { DNSResolved DNSFailed Connected ConnectFailed Disconnected }
enum
Error { NoError WrongProtocolType InvalidPacketProtocol WouldBlock NotASocket UnknownError NeedHostLookup }
Public Static Attributes
Public Static Functions
accept(NetSocket acceptSocket, NetAddress * remoteAddress)
addressToString(const NetAddress * address, char addressString)
bindAddress(const NetAddress & address, NetSocket socket, bool useUDP)
closeConnectTo(NetSocket socket)
closeSocket(NetSocket socket)
bool
compareAddresses(const NetAddress * a1, const NetAddress * a2)
connect(NetSocket socket, const NetAddress * address)
getIdealListenAddress(NetAddress * address)
getListenAddress(const NetAddress::Type type, NetAddress * address, bool forceDefaults)
Gets the desired default listen address for a specified address type.
bool
init()
bool
isAddressTypeAvailable(NetAddress::Type addressType)
bool
openConnectTo(const char * stringAddress)
openListenPort(U16 port, NetAddress::Type )
setBlocking(NetSocket socket, bool blockingIO)
setBroadcast(NetSocket socket, bool broadcastEnable)
setBufferSize(NetSocket socket, S32 bufferSize)
stringToAddress(const char * addressString, NetAddress * address, bool hostLookup, int family)
Private Static Functions
processListenSocket(NetSocket socket)
Detailed Description
Platform-specific network operations.
Public Types
ConnectionState
Enumerator
- DNSResolved
- DNSFailed
- Connected
- ConnectFailed
- Disconnected
Error
Enumerator
- NoError
- WrongProtocolType
- InvalidPacketProtocol
- WouldBlock
- NotASocket
- UnknownError
- NeedHostLookup
Public Static Attributes
const S32 MaxPacketDataSize
ConnectionAcceptedEvent * smConnectionAccept
ConnectionNotifyEvent * smConnectionNotify
ConnectionReceiveEvent * smConnectionReceive
bool smIpv4Enabled
bool smIpv6Enabled
bool smMulticastEnabled
PacketReceiveEvent * smPacketReceive
Public Static Functions
accept(NetSocket acceptSocket, NetAddress * remoteAddress)
addressToString(const NetAddress * address, char addressString)
bindAddress(const NetAddress & address, NetSocket socket, bool useUDP)
closeConnectTo(NetSocket socket)
closePort()
closeSocket(NetSocket socket)
compareAddresses(const NetAddress * a1, const NetAddress * a2)
connect(NetSocket socket, const NetAddress * address)
disableMulticast()
enableMulticast()
getConnectionAcceptedEvent()
getConnectionNotifyEvent()
getConnectionReceiveEvent()
getIdealListenAddress(NetAddress * address)
getListenAddress(const NetAddress::Type type, NetAddress * address, bool forceDefaults)
Gets the desired default listen address for a specified address type.
getPacketReceiveEvent()
getPort()
init()
isAddressTypeAvailable(NetAddress::Type addressType)
isMulticastEnabled()
listen(NetSocket socket, S32 maxConcurrentListens)
openConnectTo(const char * stringAddress)
openListenPort(U16 port, NetAddress::Type )
openPort(S32 connectPort, bool doBind)
openSocket()
recv(NetSocket socket, U8 * buffer, S32 bufferSize, S32 * bytesRead)
send(NetSocket socket, const U8 * buffer, S32 bufferSize, S32 * outBytesWritten)
sendto(const NetAddress * address, const U8 * buffer, S32 bufferSize)
sendtoSocket(NetSocket socket, const U8 * buffer, S32 bufferSize, S32 * bytesWritten)
setBlocking(NetSocket socket, bool blockingIO)
setBroadcast(NetSocket socket, bool broadcastEnable)
setBufferSize(NetSocket socket, S32 bufferSize)
shutdown()
stringToAddress(const char * addressString, NetAddress * address, bool hostLookup, int family)