$search
UDP Socket, uses sendto/recvfrom for read/write. More...
Public Member Functions | |
virtual bool | isDataInRecvBuffer () const |
Return true while there is some unread data in the reception buffer. | |
virtual void | receive (IPV4Address &source) |
Receive a packet and make its payload available for reading. | |
virtual void | receive (IPV4Address &source) |
Receive a packet and make its payload available for reading. | |
virtual bool | receiveDataAndCheckDisconnection () |
If necessary, read a byte and check for disconnection; return true on disconnection, fales otherwise. | |
virtual void | send (const IPV4Address &dest) |
Send all written data to an IP address in a single packet. | |
virtual void | send (const IPV4Address &dest) |
Send all written data to an IP address in a single packet. | |
UDPSocketStream (const std::string &targetName) | |
Create as UDP socket stream on a specific port. | |
UDPSocketStream (const string &targetName) | |
Create as UDP socket stream on a specific port. | |
virtual | ~UDPSocketStream () |
Private Attributes | |
HANDLE | hev |
Event for real data. | |
bool | selectWasCalled |
SOCKET | sock |
Socket handle. |
UDP Socket, uses sendto/recvfrom for read/write.
Definition at line 598 of file dashel-posix.cpp.
Dashel::UDPSocketStream::UDPSocketStream | ( | const string & | targetName | ) | [inline] |
Create as UDP socket stream on a specific port.
Definition at line 605 of file dashel-posix.cpp.
Dashel::UDPSocketStream::UDPSocketStream | ( | const std::string & | targetName | ) | [inline] |
Create as UDP socket stream on a specific port.
Definition at line 1120 of file dashel-win32.cpp.
virtual Dashel::UDPSocketStream::~UDPSocketStream | ( | ) | [inline, virtual] |
Definition at line 1166 of file dashel-win32.cpp.
virtual bool Dashel::UDPSocketStream::isDataInRecvBuffer | ( | ) | const [inline, virtual] |
Return true while there is some unread data in the reception buffer.
Implements Dashel::SelectableStream.
Definition at line 672 of file dashel-posix.cpp.
virtual void Dashel::UDPSocketStream::receive | ( | IPV4Address & | source | ) | [inline, virtual] |
Receive a packet and make its payload available for reading.
Block until a packet is available.
source | IP address from where the packet originates. |
Implements Dashel::PacketStream.
Definition at line 1184 of file dashel-win32.cpp.
virtual void Dashel::UDPSocketStream::receive | ( | IPV4Address & | source | ) | [inline, virtual] |
Receive a packet and make its payload available for reading.
Block until a packet is available.
source | IP address from where the packet originates. |
Implements Dashel::PacketStream.
Definition at line 656 of file dashel-posix.cpp.
virtual bool Dashel::UDPSocketStream::receiveDataAndCheckDisconnection | ( | ) | [inline, virtual] |
If necessary, read a byte and check for disconnection; return true on disconnection, fales otherwise.
Implements Dashel::SelectableStream.
Definition at line 671 of file dashel-posix.cpp.
virtual void Dashel::UDPSocketStream::send | ( | const IPV4Address & | dest | ) | [inline, virtual] |
Send all written data to an IP address in a single packet.
dest | IP address to send packet to |
Implements Dashel::PacketStream.
Definition at line 1171 of file dashel-win32.cpp.
virtual void Dashel::UDPSocketStream::send | ( | const IPV4Address & | dest | ) | [inline, virtual] |
Send all written data to an IP address in a single packet.
dest | IP address to send packet to |
Implements Dashel::PacketStream.
Definition at line 643 of file dashel-posix.cpp.
HANDLE Dashel::UDPSocketStream::hev [private] |
Event for real data.
Definition at line 1116 of file dashel-win32.cpp.
bool Dashel::UDPSocketStream::selectWasCalled [mutable, private] |
Definition at line 601 of file dashel-posix.cpp.
SOCKET Dashel::UDPSocketStream::sock [private] |
Socket handle.
Definition at line 1113 of file dashel-win32.cpp.