The network manager main header.
More...
#include <LSNNetLib.h>
List of all members.
Static Public Member Functions |
static LSBOOL LSE_CALL | InitNetwork () |
static LSVOID LSE_CALL | ShutDownNetwork () |
static LSN_SOCKET LSE_CALL | CreateUpdSocket () |
static LSVOID LSE_CALL | CloseSocket (LSN_SOCKET _sSock) |
static LSBOOL LSE_CALL | CheckSocket (LSN_SOCKET _sSock) |
static LSN_ADDRESS LSE_CALL | LookUpAddress (const LSCHAR *_pcName=NULL) |
static LSBOOL LSE_CALL | GetHostName (CString &_sReturn) |
static LSUINT32 LSE_CALL | Bind (LSN_SOCKET _sSock, LSUINT16 _ui16Port, LSN_ADDRESS _aAddress=0) |
static LSUINT32 LSE_CALL | SendTo (LSN_ADDRESS _aAddress, LSUINT16 _ui16Port, const LSVOID *_pvData, LSUINT32 _ui32Len, LSN_SOCKET _sSocket) |
static LSUINT32 LSE_CALL | ReceiveFrom (LSN_SOCKET _sSocket, LSVOID *_pvData, LSUINT32 _ui32Len, LSN_ADDRESS &_aAddress, LSUINT16 &_ui16Port) |
Static Protected Attributes |
static LSUINT32 | m_ui32InitCount |
Detailed Description
The network manager main header.
Class CNetLib Description: The network manager main header. All files in the network module include this first.
Member Function Documentation
static LSUINT32 LSE_CALL lsn::CNetLib::Bind |
( |
LSN_SOCKET |
_sSock, |
|
|
LSUINT16 |
_ui16Port, |
|
|
LSN_ADDRESS |
_aAddress = 0 |
|
) |
| [static] |
Bind a socket to the given IP address and port. If no IP address is supplied, the host name is used.
- Parameters:
-
_sSock | The socket to bind. |
_ui16Port | The port to which to bind the socket. |
_aAddress | The address to which to bind the socket. |
- Returns:
- Returns an error code.
static LSBOOL LSE_CALL lsn::CNetLib::CheckSocket |
( |
LSN_SOCKET |
_sSock | ) |
[static] |
Check a socket to see if it is valid.
- Parameters:
-
_sSock | The socket to check. |
- Returns:
- Returns true if the given socket is not invalid.
static LSVOID LSE_CALL lsn::CNetLib::CloseSocket |
( |
LSN_SOCKET |
_sSock | ) |
[static] |
Close a created socket.
- Parameters:
-
_sSock | The socket to close. |
static LSN_SOCKET LSE_CALL lsn::CNetLib::CreateUpdSocket |
( |
| ) |
[static] |
Create a non-blocking UDP socket.
- Returns:
- Returns the created UDP socket.
static LSBOOL LSE_CALL lsn::CNetLib::GetHostName |
( |
CString & |
_sReturn | ) |
[static] |
Get the host name. Attempts to wait through blocking operations.
- Parameters:
-
_sReturn | Holds the returned host name. |
- Returns:
- Returns true if the host name was resolved.
static LSBOOL LSE_CALL lsn::CNetLib::InitNetwork |
( |
| ) |
[static] |
Initialize the network library.
- Returns:
- Returns false if the required network resources are unavailable.
static LSN_ADDRESS LSE_CALL lsn::CNetLib::LookUpAddress |
( |
const LSCHAR * |
_pcName = NULL | ) |
[static] |
Resolve an address (including domain names) to an IP address.
- Parameters:
-
_pcName | Host name to resolve. |
- Returns:
- Returns the IP of the given host name or LSN_NO_ADDRESS if none could be determined.
static LSUINT32 LSE_CALL lsn::CNetLib::ReceiveFrom |
( |
LSN_SOCKET |
_sSocket, |
|
|
LSVOID * |
_pvData, |
|
|
LSUINT32 |
_ui32Len, |
|
|
LSN_ADDRESS & |
_aAddress, |
|
|
LSUINT16 & |
_ui16Port |
|
) |
| [static] |
Receive a packet from any connection. The address of the sender is returned.
- Parameters:
-
_sSocket | The socket through which to receive the data. |
_pvData | Buffer to hold the received data, if any. |
_ui32Len | The length in bytes of the buffer to which _pvData points. |
_aAddress | The sender's address. |
_ui16Port | The sender's port. |
- Returns:
- Returns the number of bytes received or an error code.
static LSUINT32 LSE_CALL lsn::CNetLib::SendTo |
( |
LSN_ADDRESS |
_aAddress, |
|
|
LSUINT16 |
_ui16Port, |
|
|
const LSVOID * |
_pvData, |
|
|
LSUINT32 |
_ui32Len, |
|
|
LSN_SOCKET |
_sSocket |
|
) |
| [static] |
Send a packet to a given address.
- Parameters:
-
_aAddress | The address. |
_ui16Port | The port. |
_pvData | The data to send. |
_ui32Len | The length in bytes of the data to send. |
_sSocket | The socket through which to send the data. |
- Returns:
- Returns an error code.
static LSVOID LSE_CALL lsn::CNetLib::ShutDownNetwork |
( |
| ) |
[static] |
Shut down the network library.
Member Data Documentation
Count of successful initializations.
The documentation for this class was generated from the following file:
- F:/My Projects/LSEngine/Modules/LSNetLib/Src/LSNNetLib.h