NetworkManager
Add this in your code:
#include <engine/network/network.h>
Description
Class to create sockets and to manage networking settings.
Static methods
CreateSocket
Create a socket.
Returns nullptr if the socket creation has failed.
Parameters:
address
: IP addressport
: Port number
std::shared_ptr<Socket> CreateSocket(const std::string& address, int port)
Code sample:
// Fake ip
std::shared_ptr<Socket> socket = NetworkManager::CreateSocket("192.168.1.10", 6004);
// Check if the socket has been created
if(socket)
{
// ...
}
ShowPSPNetworkSetupMenu
Show the network setup menu for the PSP.
This function will only work on the PSP platform.
To make networking working on PSP, the user has to manually connect to a wifi.
For this, a menu of the PSP OS ask to the user to setup a network connection.
void ShowPSPNetworkSetupMenu()
Code sample:
NetworkManager::ShowPSPNetworkSetupMenu();