kclientsocketbase.cpp
326 TQT_TQIO_LONG KClientSocketBase::tqreadBlock(char *data, TQT_TQIO_ULONG maxlen, TDESocketAddress& from)
374 TQT_TQIO_LONG KClientSocketBase::tqwriteBlock(const char *data, TQT_TQIO_ULONG len, const TDESocketAddress& to)
TQSocketNotifier * readNotifier() const
Returns a socket notifier for input on this socket.
Definition: tdesocketdevice.cpp:614
bool hasDevice() const
Returns true if the socket device has been initialised in this object, either by calling socketDevice...
Definition: tdesocketbase.cpp:150
virtual TQ_LONG waitForMore(int msecs, bool *timeout=0L)
Returns the number of bytes available for reading without blocking.
Definition: tdesocketdevice.cpp:384
SocketState state() const
Returns the current state for this socket.
Definition: kclientsocketbase.cpp:72
void resetError()
Resets the socket error code and the I/O Device's status.
Definition: tdesocketbase.cpp:315
const KResolverResults & peerResults() const
Returns the internal list of resolved results for the peer address.
Definition: kclientsocketbase.cpp:104
virtual bool lookup()
Starts the lookup for peer and local hostnames as well as their services.
Definition: kclientsocketbase.cpp:139
virtual void slotReadActivity()
This slot is connected to the read notifier's signal meaning the socket can read more data...
Definition: kclientsocketbase.cpp:426
void gotError(int code)
This signal is emitted when this object finds an error.
void hostFound()
This signal is emitted when the lookup is successfully completed.
virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len)
Writes data to the socket.
Definition: tdesocketdevice.cpp:506
virtual bool setSocketOptions(int opts)
Sets the socket options.
Definition: kclientsocketbase.cpp:83
TQSocketNotifier * writeNotifier() const
Returns a socket notifier for output on this socket.
Definition: tdesocketdevice.cpp:632
virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen)
Peeks data from the socket.
Definition: kclientsocketbase.cpp:338
A namespace to store all networking-related (socket) classes.
Definition: kbufferedsocket.h:36
void copyError()
Convenience function to set this object's error code to match that of the socket device.
Definition: kclientsocketbase.cpp:485
bool emitsReadyWrite() const
Returns true if the readyWrite signal is set to be emitted.
Definition: kclientsocketbase.cpp:411
void setResolutionEnabled(bool enable)
Enables or disables name resolution.
Definition: kclientsocketbase.cpp:119
virtual bool connect(const TQString &node=TQString::null, const TQString &service=TQString::null)=0
Attempts to connect to the these hostname and service, or use the default ones if none are given...
void setError(int status, SocketError error)
Sets the socket's error code and the I/O Device's status.
Definition: tdesocketbase.cpp:309
const KResolverResults & localResults() const
Returns the internal list of resolved results for the local address.
Definition: kclientsocketbase.cpp:114
void connected(const KResolverEntry &remote)
This socket is emitted when the socket successfully connects to a remote address. ...
KResolver & localResolver() const
Returns the internal KResolver object used for looking up the local host name and service...
Definition: kclientsocketbase.cpp:109
void setState(SocketState state)
Sets the socket state to state.
Definition: kclientsocketbase.cpp:77
void readyRead()
This signal is emitted whenever the socket is ready for reading – i.e., there is data to be read in...
void stateChanged(int newstate)
This signal is emitted whenever the socket state changes.
void readyWrite()
This signal is emitted whenever the socket is ready for writing – i.e., whenever there's space avai...
virtual bool bind(const TQString &node=TQString::null, const TQString &service=TQString::null)=0
Binds this socket to the given nodename and service, or use the default ones if none are given...
virtual TQT_TQIO_LONG tqwriteBlock(const char *data, TQT_TQIO_ULONG len)
Writes data to the socket.
Definition: kclientsocketbase.cpp:362
virtual bool connect(const KResolverEntry &address)
Connect to a remote host.
Definition: tdesocketdevice.cpp:276
virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
Reads data from this socket.
Definition: tdesocketdevice.cpp:422
virtual TDESocketAddress peerAddress() const
Returns this socket's peer address.
Definition: tdesocketdevice.cpp:571
virtual TDESocketAddress localAddress() const
Returns the local socket address.
Definition: kclientsocketbase.cpp:386
void bound(const KResolverEntry &local)
This signal is emitted when the socket successfully binds to an address.
bool emitsReadyRead() const
Returns true if the readyRead signal is set to be emitted.
Definition: kclientsocketbase.cpp:396
virtual void enableRead(bool enable)
Enables the emission of the readyRead signal.
Definition: kclientsocketbase.cpp:401
virtual TDESocketAddress localAddress() const
Returns this socket's local address.
Definition: tdesocketdevice.cpp:535
virtual bool setSocketOptions(int opts)
This implementation sets the options on the socket.
Definition: tdesocketdevice.cpp:110
virtual void stateChanging(SocketState newState)
This function is called by setState whenever the state changes.
Definition: kclientsocketbase.cpp:461
virtual TQ_LONG waitForMore(int msecs, bool *timeout=0L)
Returns the number of bytes available on this socket.
Definition: kclientsocketbase.cpp:302
void setFamily(int families)
Sets the allowed families for the resolutions.
Definition: kclientsocketbase.cpp:133
KResolver & peerResolver() const
Returns the internal KResolver object used for looking up the peer host name and service.
Definition: kclientsocketbase.cpp:99
virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen)
Peeks data in the socket.
Definition: tdesocketdevice.cpp:464
virtual bool setSocketOptions(int opts)
Set the given socket options.
Definition: tdesocketbase.cpp:65
virtual TDESocketAddress peerAddress() const
Returns the peer socket address.
Definition: kclientsocketbase.cpp:391
virtual void enableWrite(bool enable)
Enables the emission of the readyWrite signal.
Definition: kclientsocketbase.cpp:416
TDESocketDevice * socketDevice() const
Retrieves the socket implementation used on this socket.
Definition: tdesocketbase.cpp:116
void closed()
This signal is emitted when the socket completes the closing/shut down process.
virtual void slotWriteActivity()
This slot is connected to the write notifier's signal meaning the socket can write more data...
Definition: kclientsocketbase.cpp:432
virtual TQT_TQIO_LONG tqreadBlock(char *data, TQT_TQIO_ULONG maxlen)
Reads data from a socket.
Definition: kclientsocketbase.cpp:314
KClientSocketBase(TQObject *parent, const char *name)
Default constructor.
Definition: kclientsocketbase.cpp:50