struct CCL::Net::INetwork
Overview
Network service interface. More…
#include <inetwork.h> struct INetwork: public CCL::IUnknown { // methods virtual tresult CCL_API getLocalHostname (String& hostname) = 0; virtual tresult CCL_API getLocalIPAddress (IPAddress& address) = 0; virtual tresult CCL_API getAddressByHost ( SocketAddress& address, StringRef hostname ) = 0; virtual tresult CCL_API getHostByAddress ( String& hostname, const SocketAddress& address ) = 0; virtual tresult CCL_API getAddressString ( String& string, const SocketAddress& address ) = 0; virtual tresult CCL_API getAddressFromString ( SocketAddress& address, StringRef string ) = 0; virtual ISocket*CCL_API createSocket ( AddressFamily addressFamily, SocketType type, ProtocolType protocol ) = 0; virtual IStream*CCL_API openStream ( const SocketAddress& address, ProtocolType protocol ) = 0; virtual IStream*CCL_API openSSLStream ( const IPAddress& address, StringRef peerName, IProgressNotify* progress = nullptr ) = 0; virtual tresult CCL_API selectSockets ( IUnknownList* readList, IUnknownList* writeList, IUnknownList* errorList, int timeout ) = 0; };
Inherited Members
public: // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0;
Detailed Documentation
Network service interface.
Methods
virtual tresult CCL_API getLocalHostname (String& hostname) = 0
Retrieve host name of local computer.
virtual tresult CCL_API getLocalIPAddress (IPAddress& address) = 0
Get IP address of first active adapter on this computer.
virtual tresult CCL_API getAddressByHost ( SocketAddress& address, StringRef hostname ) = 0
Retrieve address of specified host name.
virtual tresult CCL_API getHostByAddress ( String& hostname, const SocketAddress& address ) = 0
Perform name resolution from an address to the host name.
virtual tresult CCL_API getAddressString ( String& string, const SocketAddress& address ) = 0
Convert address to string (e.g.
to IPv4 or IPv6 dotted notation).
virtual tresult CCL_API getAddressFromString ( SocketAddress& address, StringRef string ) = 0
Convert string to address (e.g.
from IPv4 or IPv6 dotted notation).
virtual ISocket*CCL_API createSocket ( AddressFamily addressFamily, SocketType type, ProtocolType protocol ) = 0
Create socket bound to a specific service provider.
virtual IStream*CCL_API openStream ( const SocketAddress& address, ProtocolType protocol ) = 0
Open network stream.
virtual IStream*CCL_API openSSLStream ( const IPAddress& address, StringRef peerName, IProgressNotify* progress = nullptr ) = 0
Open SSL stream.
virtual tresult CCL_API selectSockets ( IUnknownList* readList, IUnknownList* writeList, IUnknownList* errorList, int timeout ) = 0
Determines the state of multiple sockets.
On return, the lists will be filled with the matching sockets only.