20 #ifndef MSESTREAMSOCKET_H
21 #define MSESTREAMSOCKET_H
23 #include <util/constants.h>
24 #include <net/packetsocket.h>
25 #include <ktorrent_export.h>
146 typedef QSharedPointer<EncryptedPacketSocket> Ptr;
149 void preProcess(bt::Packet::Ptr packet)
override;
150 void postProcess(Uint8* data, Uint32 size)
override;
154 Uint8* reinserted_data;
155 Uint32 reinserted_data_size;
156 Uint32 reinserted_data_read;
Uint32 readData(Uint8 *buf, Uint32 len)
net::Address getRemoteAddress() const
Get the full address.
Uint32 sendData(const Uint8 *data, Uint32 len)
bool connecting() const
Is this socket connecting to a remote host.
bool connectTo(const QString &ip, Uint16 port)
Connect the socket to a remote host.
static void setTOS(Uint8 t)
Uint32 bytesAvailable() const
Get the number of bytes available to read.
void stopMonitoring()
Stop monitoring this socket.
void setRemoteAddress(const net::Address &addr)
QString getRemoteIPAddress() const
Get the IP address of the remote peer.
void disableCrypt()
Disables encryption. All data will be sent over as plain text.
void close()
Close the socket.
void reinsert(const Uint8 *d, Uint32 size)
void setRC4Encryptor(RC4Encryptor *enc)
Set the encryptor.
bool connectTo(const net::Address &addr)
Connect the socket to a remote host.
bool ok() const
see if the socket is still OK
bool connectSuccesFull() const
See if a connect was success full.
bool encrypted() const
Are we using encryption.
void startMonitoring(net::SocketReader *rdr)
Start monitoring of this socket by the monitor thread.
void initCrypt(const bt::SHA1Hash &dkey, const bt::SHA1Hash &ekey)
bt::Uint16 getRemotePort() const
Get the port of the remote peer.