libktorrent
2.2.0
|
Public Types | |
enum | State { IDLE, CONNECTING, CONNECTED, BOUND, CLOSED } |
Public Member Functions | |
SocketDevice (bt::TransportProtocol proto) | |
virtual Uint32 | bytesAvailable () const =0 |
virtual void | close ()=0 |
virtual bool | connectSuccesFull ()=0 |
See if a connectTo was succesfull in non blocking mode. | |
virtual bool | connectTo (const Address &addr)=0 |
virtual int | fd () const =0 |
virtual const Address & | getPeerName () const =0 |
virtual Address | getSockName () const =0 |
virtual bool | ok () const =0 |
virtual void | prepare (Poll *p, Poll::Mode mode)=0 |
Prepare for polling. | |
virtual bool | ready (const Poll *p, Poll::Mode mode) const =0 |
Check if the socket is ready according to the poll. | |
virtual int | recv (bt::Uint8 *buf, int max_len)=0 |
virtual void | reset ()=0 |
reset the socket (i.e. close it and create a new one) | |
virtual int | send (const bt::Uint8 *buf, int len)=0 |
virtual void | setBlocking (bool on)=0 |
void | setRemoteAddress (const Address &a) |
virtual bool | setTOS (unsigned char type_of_service)=0 |
State | state () const |
bt::TransportProtocol | transportProtocol () const |
Get the used transport protocol for this SocketDevice. | |
Protected Attributes | |
Address | addr |
State | m_state |
bool | remote_addr_override |
bt::TransportProtocol | transport_protocol |
Definition at line 31 of file socketdevice.h.
|
inline |
Set the remote address, used by Socks to set the actual address.
addr | The address |
Definition at line 68 of file socketdevice.h.