22 #ifndef NET_SERVERSOCKET_H
23 #define NET_SERVERSOCKET_H
26 #include <QSharedPointer>
27 #include <ktorrent_export.h>
28 #include <util/constants.h>
29 #include <util/bufferpool.h>
45 typedef QSharedPointer<ServerSocket> Ptr;
106 bool bind(
const QString & ip,bt::Uint16 port);
151 bool setTOS(
unsigned char type_of_service);
154 void readyToAccept(
int fd);
155 void readyToRead(
int fd);
156 void readyToWrite(
int fd);
165 #endif // NET_SERVERSOCKET_H
bool bind(const QString &ip, bt::Uint16 port)
void setReadNotificationsEnabled(bool on)
virtual void dataReceived(bt::Buffer::Ptr buffer, const net::Address &addr)=0
ServerSocket(ConnectionHandler *chandler)
int sendTo(const bt::Uint8 *buf, int size, const net::Address &addr)
virtual void newConnection(int fd, const net::Address &addr)=0
ServerSocket(DataHandler *dhandler)
int sendTo(const QByteArray &data, const net::Address &addr)
bool bind(const net::Address &addr)
void setWriteNotificationsEnabled(bool on)
virtual void readyToWrite(net::ServerSocket *sock)=0
bool setTOS(unsigned char type_of_service)