CrystalSpace

Public API Reference

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

iNetworkConnection Struct Reference

This is the network connection interface for CS. More...

#include <driver.h>

Inheritance diagram for iNetworkConnection:

iNetworkEndPoint iBase List of all members.

Public Methods

virtual bool Send (const void *data, size_t nbytes)=0
 Send nbytes of data over the connection. More...

virtual size_t Receive (void *buff, size_t maxbytes)=0
 Receive data from the connection. More...


Detailed Description

This is the network connection interface for CS.

It represents a single network connection. All network connections must implement this interface.

Definition at line 85 of file inetwork/driver.h.


Member Function Documentation

virtual size_t iNetworkConnection::Receive void *    buff,
size_t    maxbytes
[pure virtual]
 

Receive data from the connection.

If the connection is in blocking mode, then the function does not return until data has been read, an error has occurred, or the connection was closed. In non-blocking mode, Receive returns immediately. If data is available then it returns the number of bytes (<= maxbytes) which was read. If data is not available and the connection is non-blocking, then it returns 0 and GetLastError() returns CS_NET_ERR_NO_ERROR.

virtual bool iNetworkConnection::Send const void *    data,
size_t    nbytes
[pure virtual]
 

Send nbytes of data over the connection.


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