CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

iNetworkDriver Struct Reference

This is a network driver interface. More...

#include <driver.h>

Inheritance diagram for iNetworkDriver:

iBase List of all members.

Public Methods

virtual csPtr< iNetworkConnectionNewConnection (const char *target, bool reliable=true, bool blocking=false)=0
 Create a new network connection.

virtual csPtr< iNetworkListenerNewListener (const char *source, bool reliable=true, bool blockingListener=false, bool blockingConnection=false)=0
 Create a new network listener.

virtual csNetworkDriverCapabilities GetCapabilities () const=0
 Get network driver capabilities.

virtual csNetworkDriverError GetLastError () const=0
 Retrieve the code for the last error encountered.


Detailed Description

This is a network driver interface.

It represents a plug-in network driver module. All network drivers must implement this interface.

Definition at line 161 of file driver.h.


Member Function Documentation

virtual csNetworkDriverCapabilities iNetworkDriver::GetCapabilities   [pure virtual]
 

Get network driver capabilities.

This function returns information describing the capabilities of the driver.

Deprecated:
This function is deprecated since the reliable flag is deprecated, and all drivers should support blocking and non-blocking.

virtual csNetworkDriverError iNetworkDriver::GetLastError   [pure virtual]
 

Retrieve the code for the last error encountered.

virtual csPtr<iNetworkConnection> iNetworkDriver::NewConnection const char *    target,
bool    reliable = true,
bool    blocking = false
[pure virtual]
 

Create a new network connection.

The 'target' parameter is driver dependent.

For example, with a socket driver, the target might be "host:port/protocol" (i.e. "server.game.net:666/tcp"); etc. with a modem driver it might be "device:phone-number" (i.e. "com1:555-1234"); The cssocket driver, for instance, supports protcols "tcp", "udp", and "multicast".

The 'blocking' flag determines whether operations on the connection return immediately in all cases or wait until the operation can be completed successfully.

Returns:
the new connection object or 0 if the connection failed.
Deprecated:
The 'reliable' flag is deprecated. This feature is now specified as part of the target string. (For instance, with the cssocket driver, a protocol of "tcp" is reliable, whereas "udp" is not.)

virtual csPtr<iNetworkListener> iNetworkDriver::NewListener const char *    source,
bool    reliable = true,
bool    blockingListener = false,
bool    blockingConnection = false
[pure virtual]
 

Create a new network listener.

The 'source' parameter is driver dependent.

For example, with a socket driver, the source might be "port/protocol" (i.e. "666/tcp"); with a modem driver it might be "device" (i.e. "com1"); etc. The cssocket driver, for instance, supports protcols "tcp", "udp", and "multicast".

The 'blockingListener' flag determines whether or not the Accept() method blocks while being called. The 'blockingConnection' flag determines whether or not methods in the resulting connection object block.

Returns:
the new listener object or 0 if the operation failed.
Deprecated:
The 'reliable' flag is deprecated. This feature is now specified as part of the target string. (For instance, with the cssocket driver, a protocol of "tcp" is reliable, whereas "udp" is not.)


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18