zenilib
0.5.3.0
|
A higher level UDP_Socket. More...
#include <Net.h>
Inherits Zeni::UDP_Socket.
Public Member Functions | |
Split_UDP_Socket (const Uint16 &port, const Uint16 &chunk_sets=ZENI_DEFAULT_CHUNK_SETS, const Uint16 &chunk_size=ZENI_DEFAULT_CHUNK_SIZE) | |
virtual int | receive (IPaddress &ip, const void *const &data, const Uint16 &num_bytes) |
Receive data of up to data.size() from the returned IPaddress; Will error if num_bytes/data.size() is too low. More... | |
virtual int | receive (IPaddress &ip, String &data) |
virtual void | send (const IPaddress &ip, const void *const &data, const Uint16 &num_bytes) |
Send data to an IPaddress. More... | |
virtual void | send (const IPaddress &ip, const String &data) |
Public Member Functions inherited from Zeni::UDP_Socket | |
UDP_Socket (const Uint16 &port) | |
virtual | ~UDP_Socket () |
IPaddress | peer_address () const |
Apparently only works if the port was explicitly specified. More... | |
A higher level UDP_Socket.
It works almost identically to the UDP_Socket as far as users should be concerned. On the other hand, it works around UDP packet size limitations very well (and adds some overhead in the process). If you need to use this, your design is probably flawed, but it does its job as needed.
Contact: bazal d@ze nipex .com
Zeni::Split_UDP_Socket::Split_UDP_Socket | ( | const Uint16 & | port, |
const Uint16 & | chunk_sets = ZENI_DEFAULT_CHUNK_SETS , |
||
const Uint16 & | chunk_size = ZENI_DEFAULT_CHUNK_SIZE |
||
) |
|
virtual |
Receive data of up to data.size() from the returned IPaddress; Will error if num_bytes/data.size() is too low.
Reimplemented from Zeni::UDP_Socket.
Definition at line 518 of file Net.cpp.
References Zeni::String::c_str(), chunk, int, memcpy, Zeni::UDP_Socket::receive(), Zeni::String::resize(), Zeni::VLUID::size(), Zeni::String::size(), Zeni::String::std_str(), u, Zeni::VLUID::unserialize(), and Zeni::unserialize().
Referenced by receive().
Reimplemented from Zeni::UDP_Socket.
Definition at line 561 of file Net.cpp.
References Zeni::String::c_str(), receive(), Zeni::String::resize(), and Zeni::String::size().
|
virtual |
Send data to an IPaddress.
Reimplemented from Zeni::UDP_Socket.
Definition at line 473 of file Net.cpp.
References Zeni::String::c_str(), chunk, memcpy, Zeni::String::resize(), Zeni::UDP_Socket::send(), Zeni::VLUID::serialize(), Zeni::serialize(), Zeni::VLUID::size(), and u.
Referenced by send().
Reimplemented from Zeni::UDP_Socket.
Definition at line 514 of file Net.cpp.
References Zeni::String::c_str(), send(), and Zeni::String::size().