![]() |
Public API Reference |
#include <netman.h>
Inheritance diagram for iNetworkPacket:
Public Methods | |
virtual bool | Read (csDataStream &data, iNetworkConnection *socket)=0 |
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. More... | |
virtual char * | Write (size_t &length)=0 |
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. More... | |
virtual csPtr< iNetworkPacket > | New ()=0 |
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. More... | |
virtual bool | FilterSocket (iNetworkConnection *)=0 |
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. More... |
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 CS networking API.
Definition at line 45 of file netman.h.
|
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.
|