Pyro higlevel network API
Classes | Public Member Functions | List of all members
net::Host Class Reference

Classes

class  Private
 

Public Member Functions

 Host (const os::String &cHost, uint32 nPort=0)
 Default constructor. More...
 
 Host (IPAddress &cAddress, uint32 nPort=0)
 Constructor. More...
 
 Host (Url &cUrl)
 Constructor. More...
 
virtual ~Host (void)
 
void SetHost (const os::String &cHost)
 
os::String GetHost (void)
 
void SetPort (uint32 nPort)
 
uint32 GetPort (void)
 
IPAddressGetIPAddress (void)
 Get the IP address of the current host. More...
 

Constructor & Destructor Documentation

Host::Host ( const os::String &  cHost,
uint32  nPort = 0 
)
Description:
Create a Host from a simple hostname and port. If the hostname is valid then the IPAddress returned by GetIPAddress() will be valid.
Parameters
cHostThe hostname E.g. www.example.com
nPortPort number to connect to
Author
Kristian Van Der Vliet (vande.nosp@m.rs@l.nosp@m.iqwyd.nosp@m..com)
Host::Host ( IPAddress cAddress,
uint32  nPort = 0 
)
Description:
Creates a Host from an IPAddress. The hostname retrived via. GetHost() will be invalid unless it is explicitly set via. SetHost()
Parameters
cAddressThe IPAddress of the host
nPortPort number to connect to
See Also
GetHost(), SetHost()
Author
Kristian Van Der Vliet (vande.nosp@m.rs@l.nosp@m.iqwyd.nosp@m..com)
Host::Host ( Url cUrl)
Description:
Creates a Host from a URL. The URL can be used to specify the port number, if required. If the hostname is valid then the IPAddress returned by GetIPAddress() will be valid.
Parameters
cUrlThe URL of the host
Author
Kristian Van Der Vliet (vande.nosp@m.rs@l.nosp@m.iqwyd.nosp@m..com)
Host::~Host ( void  )
virtual

Member Function Documentation

os::String Host::GetHost ( void  )
IPAddress * Host::GetIPAddress ( void  )
Description:
Returns an IPAddress for the current host.
See Also
GetHost()
Author
Kristian Van Der Vliet (vande.nosp@m.rs@l.nosp@m.iqwyd.nosp@m..com)
uint32 Host::GetPort ( void  )
void Host::SetHost ( const os::String &  cHost)
void Host::SetPort ( uint32  nPort)