![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
#include <SocketLayer.h>
Public Member Functions | |
| SocketLayer () | |
| Default Constructor. | |
| ~SocketLayer () | |
Static Public Member Functions | |
| static SOCKET | CreateBoundSocket (unsigned short port, bool blockingSocket, const char *forceHostAddress, unsigned int sleepOn10048, unsigned int extraSocketOptions, unsigned short socketFamily) |
| static SOCKET | CreateBoundSocket_Old (unsigned short port, bool blockingSocket, const char *forceHostAddress, unsigned int sleepOn10048, unsigned int extraSocketOptions) |
| static SOCKET | CreateBoundSocket_PS3Lobby (unsigned short port, bool blockingSocket, const char *forceHostAddress, unsigned short socketFamily) |
| static SOCKET | CreateBoundSocket_PSP2 (unsigned short port, bool blockingSocket, const char *forceHostAddress, unsigned short socketFamily) |
| static const char * | DomainNameToIP (const char *domainName) |
| static const char * | DomainNameToIP_Old (const char *domainName) |
| static bool | GetFirstBindableIP (char firstBindable[128], int ipProto) |
| static unsigned short | GetLocalPort (SOCKET s) |
| static void | GetMyIP (SystemAddress addresses[10]) |
| static SocketLayerOverride * | GetSocketLayerOverride (void) |
| static RakNet::RakString | GetSubNetForSocketAndIp (SOCKET inSock, RakNet::RakString inIpString) |
| static void | GetSystemAddress (SOCKET s, SystemAddress *systemAddressOut) |
| static void | GetSystemAddress_Old (SOCKET s, SystemAddress *systemAddressOut) |
| static bool | IsPortInUse (unsigned short port, const char *hostAddress, unsigned short socketFamily) |
| static bool | IsPortInUse_Old (unsigned short port, const char *hostAddress) |
| static bool | IsSocketFamilySupported (const char *hostAddress, unsigned short socketFamily) |
| static void | RecvFromBlocking (const SOCKET s, RakPeer *rakPeer, unsigned short remotePortRakNetWasStartedOn_PS3, unsigned int extraSocketOptions, char *dataOut, int *bytesReadOut, SystemAddress *systemAddressOut, RakNet::TimeUS *timeRead) |
| static void | RecvFromBlocking_Old (const SOCKET s, RakPeer *rakPeer, unsigned short remotePortRakNetWasStartedOn_PS3, unsigned int extraSocketOptions, char *dataOut, int *bytesReadOut, SystemAddress *systemAddressOut, RakNet::TimeUS *timeRead) |
| static int | SendTo (SOCKET s, const char *data, int length, SystemAddress &systemAddress, unsigned short remotePortRakNetWasStartedOn_PS3, unsigned int extraSocketOptions, const char *file, const long line) |
| static int | SendTo_360 (SOCKET s, const char *data, int length, const char *voiceData, int voiceLength, const SystemAddress &systemAddress, unsigned int extraSocketOptions) |
| static int | SendTo_PC (SOCKET s, const char *data, int length, const SystemAddress &systemAddress, const char *file, const long line) |
| static int | SendTo_PS3Lobby (SOCKET s, const char *data, int length, const SystemAddress &systemAddress, unsigned short remotePortRakNetWasStartedOn_PS3) |
| static int | SendTo_PSP2 (SOCKET s, const char *data, int length, const SystemAddress &systemAddress, unsigned short remotePortRakNetWasStartedOn_PS3) |
| static int | SendToTTL (SOCKET s, const char *data, int length, SystemAddress &systemAddress, int ttl) |
| static void | SetDoNotFragment (SOCKET listenSocket, int opt, int IPPROTO) |
| static void | SetNonBlocking (SOCKET listenSocket) |
| static void | SetSocketLayerOverride (SocketLayerOverride *_slo) |
| static void | Write (const SOCKET writeSocket, const char *data, const int length) |
Static Private Member Functions | |
| static void | SetSocketOptions (SOCKET listenSocket) |
Static Private Attributes | |
| static SocketLayerOverride * | slo |
Definition at line 45 of file SocketLayer.h.
| RakNet::SocketLayer::SocketLayer | ( | ) |
| RakNet::SocketLayer::~SocketLayer | ( | ) |
| static SOCKET RakNet::SocketLayer::CreateBoundSocket | ( | unsigned short | port, |
| bool | blockingSocket, | ||
| const char * | forceHostAddress, | ||
| unsigned int | sleepOn10048, | ||
| unsigned int | extraSocketOptions, | ||
| unsigned short | socketFamily | ||
| ) | [static] |
Creates a bound socket to listen for incoming connections on the specified port
| [in] | port | the port number |
| [in] | blockingSocket |
| static SOCKET RakNet::SocketLayer::CreateBoundSocket_Old | ( | unsigned short | port, |
| bool | blockingSocket, | ||
| const char * | forceHostAddress, | ||
| unsigned int | sleepOn10048, | ||
| unsigned int | extraSocketOptions | ||
| ) | [static] |
| static SOCKET RakNet::SocketLayer::CreateBoundSocket_PS3Lobby | ( | unsigned short | port, |
| bool | blockingSocket, | ||
| const char * | forceHostAddress, | ||
| unsigned short | socketFamily | ||
| ) | [static] |
| static SOCKET RakNet::SocketLayer::CreateBoundSocket_PSP2 | ( | unsigned short | port, |
| bool | blockingSocket, | ||
| const char * | forceHostAddress, | ||
| unsigned short | socketFamily | ||
| ) | [static] |
| static const char* RakNet::SocketLayer::DomainNameToIP | ( | const char * | domainName | ) | [static] |
| static const char* RakNet::SocketLayer::DomainNameToIP_Old | ( | const char * | domainName | ) | [static] |
| static bool RakNet::SocketLayer::GetFirstBindableIP | ( | char | firstBindable[128], |
| int | ipProto | ||
| ) | [static] |
| static unsigned short RakNet::SocketLayer::GetLocalPort | ( | SOCKET | s | ) | [static] |
| static void RakNet::SocketLayer::GetMyIP | ( | SystemAddress | addresses[10] | ) | [static] |
Retrieve all local IP address in a string format.
| [in] | s | The socket whose port we are referring to |
| [in] | ipList | An array of ip address in dotted notation. |
| static SocketLayerOverride* RakNet::SocketLayer::GetSocketLayerOverride | ( | void | ) | [inline, static] |
Definition at line 143 of file SocketLayer.h.
{return slo;}
| static RakNet::RakString RakNet::SocketLayer::GetSubNetForSocketAndIp | ( | SOCKET | inSock, |
| RakNet::RakString | inIpString | ||
| ) | [static] |
Given a socket and IP, retrieves the subnet mask, on linux the socket is unused
| [in] | inSock | the socket |
| [in] | inIpString | The ip of the interface you wish to retrieve the subnet mask from |
| static void RakNet::SocketLayer::GetSystemAddress | ( | SOCKET | s, |
| SystemAddress * | systemAddressOut | ||
| ) | [static] |
| static void RakNet::SocketLayer::GetSystemAddress_Old | ( | SOCKET | s, |
| SystemAddress * | systemAddressOut | ||
| ) | [static] |
| static bool RakNet::SocketLayer::IsPortInUse | ( | unsigned short | port, |
| const char * | hostAddress, | ||
| unsigned short | socketFamily | ||
| ) | [static] |
| static bool RakNet::SocketLayer::IsPortInUse_Old | ( | unsigned short | port, |
| const char * | hostAddress | ||
| ) | [static] |
Returns if this specified port is in use, for UDP
| [in] | port | the port number |
| static bool RakNet::SocketLayer::IsSocketFamilySupported | ( | const char * | hostAddress, |
| unsigned short | socketFamily | ||
| ) | [static] |
| static void RakNet::SocketLayer::RecvFromBlocking | ( | const SOCKET | s, |
| RakPeer * | rakPeer, | ||
| unsigned short | remotePortRakNetWasStartedOn_PS3, | ||
| unsigned int | extraSocketOptions, | ||
| char * | dataOut, | ||
| int * | bytesReadOut, | ||
| SystemAddress * | systemAddressOut, | ||
| RakNet::TimeUS * | timeRead | ||
| ) | [static] |
| static void RakNet::SocketLayer::RecvFromBlocking_Old | ( | const SOCKET | s, |
| RakPeer * | rakPeer, | ||
| unsigned short | remotePortRakNetWasStartedOn_PS3, | ||
| unsigned int | extraSocketOptions, | ||
| char * | dataOut, | ||
| int * | bytesReadOut, | ||
| SystemAddress * | systemAddressOut, | ||
| RakNet::TimeUS * | timeRead | ||
| ) | [static] |
Read data from a socket
| [in] | s | the socket |
| [in] | rakPeer | The instance of rakPeer containing the recvFrom C callback |
| [in] | errorCode | An error code if an error occured . |
| [in] | connectionSocketIndex | Which of the sockets in RakPeer we are using |
| static int RakNet::SocketLayer::SendTo | ( | SOCKET | s, |
| const char * | data, | ||
| int | length, | ||
| SystemAddress & | systemAddress, | ||
| unsigned short | remotePortRakNetWasStartedOn_PS3, | ||
| unsigned int | extraSocketOptions, | ||
| const char * | file, | ||
| const long | line | ||
| ) | [static] |
Call sendto (UDP obviously)
| [in] | s | the socket |
| [in] | data | The byte buffer to send |
| [in] | length | The length of the data in bytes |
| [in] | binaryAddress | The address of the remote host in binary format. |
| [in] | port | The port number to send to. |
| static int RakNet::SocketLayer::SendTo_360 | ( | SOCKET | s, |
| const char * | data, | ||
| int | length, | ||
| const char * | voiceData, | ||
| int | voiceLength, | ||
| const SystemAddress & | systemAddress, | ||
| unsigned int | extraSocketOptions | ||
| ) | [static] |
| static int RakNet::SocketLayer::SendTo_PC | ( | SOCKET | s, |
| const char * | data, | ||
| int | length, | ||
| const SystemAddress & | systemAddress, | ||
| const char * | file, | ||
| const long | line | ||
| ) | [static] |
| static int RakNet::SocketLayer::SendTo_PS3Lobby | ( | SOCKET | s, |
| const char * | data, | ||
| int | length, | ||
| const SystemAddress & | systemAddress, | ||
| unsigned short | remotePortRakNetWasStartedOn_PS3 | ||
| ) | [static] |
| static int RakNet::SocketLayer::SendTo_PSP2 | ( | SOCKET | s, |
| const char * | data, | ||
| int | length, | ||
| const SystemAddress & | systemAddress, | ||
| unsigned short | remotePortRakNetWasStartedOn_PS3 | ||
| ) | [static] |
| static int RakNet::SocketLayer::SendToTTL | ( | SOCKET | s, |
| const char * | data, | ||
| int | length, | ||
| SystemAddress & | systemAddress, | ||
| int | ttl | ||
| ) | [static] |
Call sendto (UDP obviously)
| [in] | s | the socket |
| [in] | data | The byte buffer to send |
| [in] | length | The length of the data in bytes |
| [in] | ip | The address of the remote host in dotted notation. |
| [in] | port | The port number to send to. |
| [in] | s | the socket |
| [in] | data | The byte buffer to send |
| [in] | length | The length of the data in bytes |
| [in] | ip | The address of the remote host in dotted notation. |
| [in] | port | The port number to send to. |
| [in] | ttl | Max hops of datagram |
| static void RakNet::SocketLayer::SetDoNotFragment | ( | SOCKET | listenSocket, |
| int | opt, | ||
| int | IPPROTO | ||
| ) | [static] |
| static void RakNet::SocketLayer::SetNonBlocking | ( | SOCKET | listenSocket | ) | [static] |
Sets the socket flags to nonblocking
| [in] | listenSocket | the socket to set |
| static void RakNet::SocketLayer::SetSocketLayerOverride | ( | SocketLayerOverride * | _slo | ) | [static] |
| static void RakNet::SocketLayer::SetSocketOptions | ( | SOCKET | listenSocket | ) | [static, private] |
| static void RakNet::SocketLayer::Write | ( | const SOCKET | writeSocket, |
| const char * | data, | ||
| const int | length | ||
| ) | [static] |
Write data of length length to writeSocket
| [in] | writeSocket | The socket to write to |
| [in] | data | The data to write |
| [in] | length | The length of data |
SocketLayerOverride* RakNet::SocketLayer::slo [static, private] |
Definition at line 159 of file SocketLayer.h.
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.