iNetworkPacket2 Struct Reference
The application writes an implementation of the network packet interface and a new instance of that implementation is passed to the network manager with each new connection registered. More...
#include <netman.h>
Inheritance diagram for iNetworkPacket2:

Public Methods | |
virtual bool | Read (csDataStream &data, iNetworkSocket2 *socket)=0 |
Read in data received over the network. | |
virtual char * | Write (size_t &length)=0 |
Returns the packet as flat data which can be sent over the network. | |
virtual csPtr< iNetworkPacket2 > | New ()=0 |
Return a new instance of this implementation. | |
virtual bool | FilterSocket (iNetworkSocket2 *)=0 |
Return true from this function if this packet should be sent over the given socket, false otherwise. |
Detailed Description
The application writes an implementation of the network packet interface and a new instance of that implementation is passed to the network manager with each new connection registered.These packets are used as buffers for incoming data. Other instances are passed to the transmission methods and their data is sent to remote hosts. This is for the ENSocket plugin API.
Definition at line 85 of file netman.h.
Member Function Documentation
|
Return true from this function if this packet should be sent over the given socket, false otherwise. Used by iNetworkManager::SendToAll() to filter out unwanted sockets. Read-only packets may ignore this. |
|
Return a new instance of this implementation. Used for packets associated with listeners to create a new packet for each new connection created from the listener. |
|
Read in data received over the network. Returns true if the entire packet has been read, and a network event should be posted. Otherwise, further calls to Read() are neccessary. Resets length to the amount of data actually read. If not all the data was read, the remaining data can be assumed to be part of the next packet. Write-only packets may ignore this. |
|
Returns the packet as flat data which can be sent over the network. Sets length to the length of the buffer. Read-only packets may ignore this. |
The documentation for this struct was generated from the following file:
- inetwork/netman.h
Generated for Crystal Space by doxygen 1.2.18