libktorrent  2.2.0
Public Types | Public Member Functions | List of all members
net::Socket Class Reference

#include <socket.h>

Inheritance diagram for net::Socket:
Inheritance graph
[legend]

Public Types

typedef QSharedPointer< SocketPtr
 
- Public Types inherited from net::SocketDevice
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 AddressgetPeerName () 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.
 
- Public Member Functions inherited from net::SocketDevice
 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

- Protected Attributes inherited from net::SocketDevice
Address addr
 
State m_state
 
bool remote_addr_override
 
bt::TransportProtocol transport_protocol
 

Detailed Description

Author
Joris Guisson joris.nosp@m..gui.nosp@m.sson@.nosp@m.gmai.nosp@m.l.com

Definition at line 54 of file socket.h.


The documentation for this class was generated from the following file: