plptools
Loading...
Searching...
No Matches
ncp_client Namespace Reference

Functions

template<typename Client , typename Client16 , typename Client32 >
Client * connect (const std::string &host, int port, bool waitForDevice, Enum< ConnectionError > *error)
 Create a new NCP client instance, selecting the appropriate subclass based on the device type reported by an NCP$INFO query. More...
 

Function Documentation

◆ connect()

template<typename Client , typename Client16 , typename Client32 >
Client * ncp_client::connect ( const std::string &  host,
int  port,
bool  waitForDevice,
Enum< ConnectionError > *  error 
)

Create a new NCP client instance, selecting the appropriate subclass based on the device type reported by an NCP$INFO query.

Fails instantly if ncpd isn't running or accepting connections.

Parameters
hostThe host be used for connecting to the ncpd daemon.
portThe port be used for connecting to the ncpd daemon.
waitForDeviceContinue reconnecting to the ncpd daemon until a Psion is available for connection; blocking.
errorOut-parameter returning any error encountered; set to FACERR_NONE on success.
Returns
A newly instantiated ncpd client corresponding with the device type (EPOC16 or EPOC32); nullptr on failure.

Definition at line 53 of file ncpclient.h.