25 #ifndef KBUFFEREDSOCKET_H
26 #define KBUFFEREDSOCKET_H
29 #include <tqcstring.h>
30 #include <tqvaluelist.h>
31 #include "kstreamsocket.h"
32 #include <tdelibs_export.h>
38 class TDEBufferedSocketPrivate;
71 TDEBufferedSocket(
const TQString& node = TQString::null,
const TQString& service = TQString::null,
72 TQObject* parent = 0L,
const char *name = 0L);
88 virtual bool setSocketOptions(
int opts);
103 virtual TQ_LONG bytesAvailable()
const;
106 virtual qint64 bytesAvailable()
const;
112 virtual TQ_LONG waitForMore(
int msecs,
bool *timeout = 0L);
117 virtual TQT_TQIO_LONG tqreadBlock(
char *data, TQT_TQIO_ULONG maxlen);
125 virtual TQT_TQIO_LONG tqreadBlock(
char *data, TQT_TQIO_ULONG maxlen,
TDESocketAddress& from);
130 virtual TQ_LONG peekBlock(
char *data, TQ_ULONG maxlen);
138 virtual TQ_LONG peekBlock(
char *data, TQ_ULONG maxlen,
TDESocketAddress &from);
143 virtual TQT_TQIO_LONG tqwriteBlock(
const char *data, TQT_TQIO_ULONG len);
151 virtual TQT_TQIO_LONG tqwriteBlock(
const char *data, TQT_TQIO_ULONG len,
const TDESocketAddress& to);
156 virtual void enableRead(
bool enable);
161 virtual void enableWrite(
bool enable);
166 void setInputBuffering(
bool enable);
176 void setOutputBuffering(
bool enable);
187 virtual TQ_ULONG bytesToWrite()
const;
190 virtual qint64 bytesToWrite()
const;
199 virtual void closeNow();
204 bool canReadLine()
const;
209 TQCString readLine();
217 void waitForConnect();
229 virtual void slotReadActivity();
234 virtual void slotWriteActivity();
240 void bytesWritten(
int bytes);
246 TDEBufferedSocketPrivate *d;
A generic socket address.
base for I/O buffer implementation
Low-level socket functionality.
A namespace to store all networking-related (socket) classes.
SocketState
Socket states.