Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <vsnet_socketudp.h>
Public Member Functions | |
VsnetUDPSocket (int sock, const AddressIP &remote_ip, SocketSet &set) | |
~VsnetUDPSocket () | |
virtual bool | isTcp () const |
virtual int | optPayloadSize () const |
virtual int | queueLen (int pri) |
virtual bool | isActive () |
virtual int | sendbuf (Packet *packet, const AddressIP *to, int pcktflags) |
virtual int | recvbuf (Packet *p, AddressIP *ipadr) |
virtual bool | lower_selected (int datalen=-1) |
virtual void | dump (std::ostream &ostr) const |
virtual bool | setRemoteAddress (const AddressIP &inp) |
![]() | |
VsnetSocket (int sock, const AddressIP &remote_ip, const char *socktype, SocketSet &set) | |
virtual | ~VsnetSocket () |
bool | eq (const VsnetSocket &r) const |
bool | lt (const VsnetSocket &r) const |
bool | sameAddress (const VsnetSocket &r) const |
const AddressIP & | getRemoteAddress () const |
const AddressIP & | getLocalAddress () const |
bool | setLocalAddress (const AddressIP &lip) |
![]() | |
VsnetSocketBase (int fd, const char *socktype, SocketSet &set) | |
virtual | ~VsnetSocketBase () |
bool | valid () const |
int | get_fd () const |
int | close_fd () |
const char * | get_socktype () const |
bool | set_block () |
bool | set_nonblock () |
bool | get_nonblock () const |
void | disconnect (const char *s) |
virtual bool | need_test_writable () |
virtual bool | write_on_negative () |
virtual int | get_write_fd () const |
virtual int | lower_sendbuf () |
virtual void | lower_clean_sendbuf () |
virtual bool | isReadyToSend (fd_set *) |
void | setSet (SocketSet *set) |
Additional Inherited Members | |
![]() | |
virtual void | child_disconnect (const char *s) |
![]() | |
AddressIP | _remote_ip |
AddressIP | _local_ip |
Definition at line 15 of file vsnet_socketudp.h.
Definition at line 22 of file vsnet_socketudp.cpp.
References MAXBUFFER, and VsnetUDPSocket().
Referenced by VsnetUDPSocket().
VsnetUDPSocket::~VsnetUDPSocket | ( | ) |
Definition at line 30 of file vsnet_socketudp.cpp.
|
virtual |
Implements VsnetSocket.
Definition at line 119 of file vsnet_socketudp.cpp.
References VsnetSocket::_remote_ip, and VsnetSocketBase::get_fd().
|
virtual |
Implements VsnetSocketBase.
Definition at line 124 of file vsnet_socketudp.cpp.
References VSMutex::lock(), and VSMutex::unlock().
|
inlinevirtual |
Implements VsnetSocketBase.
Definition at line 132 of file vsnet_socketudp.cpp.
References VsnetSocketBase::_set, SocketSet::add_pending(), COUT, VsnetSocketBase::get_fd(), VSMutex::lock(), VSMutex::unlock(), and vsnetLastError().
|
virtual |
Implements VsnetSocket.
Definition at line 35 of file vsnet_socketudp.cpp.
This function copies or moves data into the given PacketMem variable. It is preferred over the other recvbuf function because it may reduce the number of copy operations by at least one.
Implements VsnetSocket.
Definition at line 101 of file vsnet_socketudp.cpp.
References VsnetSocketBase::_set, buffer, VsnetSocketBase::get_fd(), PacketMem::len(), VSMutex::lock(), SocketSet::rem_pending(), and VSMutex::unlock().
Implements VsnetSocket.
Definition at line 69 of file vsnet_socketudp.cpp.
References VsnetSocket::_remote_ip, COUT, Packet::display(), VsnetSocketBase::get_fd(), Packet::getCommand(), Packet::getSendBuffer(), Packet::getSendBufferLength(), vsnetLastError(), and x.
Reimplemented from VsnetSocket.
Definition at line 64 of file vsnet_socketudp.cpp.
References VsnetSocket::_remote_ip.