libktorrent
2.1.1
|
#include <socket.h>
Public Types | |
typedef QSharedPointer< Socket > | Ptr |
![]() | |
enum | State { IDLE, CONNECTING, CONNECTED, BOUND, CLOSED } |
Public Member Functions | |
Socket (bool tcp, int ip_version) | |
Socket (int fd, int ip_version) | |
int | accept (Address &a) |
bool | bind (const Address &addr, bool also_listen) |
bool | bind (const QString &ip, Uint16 port, bool also_listen) |
Uint32 | bytesAvailable () const override |
void | close () override |
bool | connectSuccesFull () override |
See if a connectTo was succesfull in non blocking mode. | |
bool | connectTo (const Address &addr) override |
int | fd () const override |
const Address & | getPeerName () const override |
Address | getSockName () const override |
bool | isIPv4 () const |
bool | isIPv6 () const |
bool | ok () const override |
void | prepare (Poll *p, Poll::Mode mode) override |
Prepare for polling. | |
bool | ready (const Poll *p, Poll::Mode mode) const override |
Check if the socket is ready according to the poll. | |
int | recv (bt::Uint8 *buf, int max_len) override |
int | recvFrom (bt::Uint8 *buf, int max_size, Address &addr) |
void | reset () override |
reset the socket (i.e. close it and create a new one) | |
int | send (const bt::Uint8 *buf, int len) override |
int | sendTo (const bt::Uint8 *buf, int size, const Address &addr) |
void | setBlocking (bool on) override |
bool | setTOS (unsigned char type_of_service) override |
int | take () |
Take the filedescriptor from the socket. | |
![]() | |
SocketDevice (bt::TransportProtocol proto) | |
void | setRemoteAddress (const Address &a) |
State | state () const |
bt::TransportProtocol | transportProtocol () const |
Get the used transport protocol for this SocketDevice. | |
Additional Inherited Members | |
![]() | |
Address | addr |
State | m_state |
bool | remote_addr_override |
bt::TransportProtocol | transport_protocol |