KDECore
k3clientsocketbase.cpp
Go to the documentation of this file.
QSocketNotifier * readNotifier() const
Returns a socket notifier for input on this socket.
Definition: k3socketdevice.cpp:647
virtual bool connect(const QString &node=QString(), const QString &service=QString(), OpenMode mode=ReadWrite)=0
Attempts to connect to a given hostname and service, or use the default ones if none are given...
virtual qint64 writeData(const char *data, qint64 len, const KSocketAddress *to=0L)
Writes the given data to the given destination address.
Definition: k3socketdevice.cpp:536
virtual bool flush()
This call is not supported on unbuffered sockets.
Definition: k3clientsocketbase.cpp:290
bool hasDevice() const
Returns true if the socket device has been initialised in this object, either by calling socketDevice...
Definition: k3socketbase.cpp:182
QSocketNotifier * writeNotifier() const
Returns a socket notifier for output on this socket.
Definition: k3socketdevice.cpp:665
SocketState state() const
Returns the current state for this socket.
Definition: k3clientsocketbase.cpp:66
void resetError()
Resets the socket error code and the I/O Device's status.
Definition: k3socketbase.cpp:441
virtual bool connect(const KResolverEntry &address, OpenMode mode=ReadWrite)
Connect to a remote host.
Definition: k3socketdevice.cpp:345
virtual bool bind(const QString &node=QString(), const QString &service=QString())=0
Binds this socket to the given nodename and service, or use the default ones if none are given...
const KResolverResults & peerResults() const
Returns the internal list of resolved results for the peer address.
Definition: k3clientsocketbase.cpp:98
virtual bool lookup()
Starts the lookup for peer and local hostnames as well as their services.
Definition: k3clientsocketbase.cpp:133
virtual void slotReadActivity()
This slot is connected to the read notifier's signal meaning the socket can read more data...
Definition: k3clientsocketbase.cpp:394
virtual KSocketAddress peerAddress() const
Returns the peer socket address.
Definition: k3clientsocketbase.cpp:359
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 bool setSocketOptions(int opts)
This implementation sets the options on the socket.
Definition: k3socketdevice.cpp:137
virtual bool setSocketOptions(int opts)
Sets the socket options.
Definition: k3clientsocketbase.cpp:77
virtual KSocketAddress localAddress() const
Returns the local socket address.
Definition: k3clientsocketbase.cpp:354
virtual qint64 writeData(const char *data, qint64 len, const KSocketAddress *to)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: k3clientsocketbase.cpp:340
A namespace to store all networking-related (socket) classes.
Definition: k3bufferedsocket.h:35
virtual qint64 readData(char *data, qint64 maxlen, KSocketAddress *from)
Reads data from a socket.
Definition: k3clientsocketbase.cpp:316
void copyError()
Convenience function to set this object's error code to match that of the socket device.
Definition: k3clientsocketbase.cpp:453
bool emitsReadyWrite() const
Returns true if the readyWrite signal is set to be emitted.
Definition: k3clientsocketbase.cpp:379
void setResolutionEnabled(bool enable)
Enables or disables name resolution.
Definition: k3clientsocketbase.cpp:113
Definition: k3socketbase.h:145
const KResolverResults & localResults() const
Returns the internal list of resolved results for the local address.
Definition: k3clientsocketbase.cpp:108
virtual qint64 readData(char *data, qint64 maxlen, KSocketAddress *from=0L)
Reads data and the source address from this socket.
Definition: k3socketdevice.cpp:494
virtual KSocketAddress peerAddress() const
Returns this socket's peer address.
Definition: k3socketdevice.cpp:604
virtual qint64 peekData(char *data, qint64 maxlen, KSocketAddress *from=0L)
Peeks the data in the socket and the source address.
Definition: k3socketdevice.cpp:515
KResolver & localResolver() const
Returns the internal KResolver object used for looking up the local host name and service...
Definition: k3clientsocketbase.cpp:103
void setState(SocketState state)
Sets the socket state to state.
Definition: k3clientsocketbase.cpp:71
virtual bool setSocketOptions(int opts)
Set the given socket options.
Definition: k3socketbase.cpp:86
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 qint64 peekData(char *data, qint64 maxlen, KSocketAddress *from)
Peeks data from the socket.
Definition: k3clientsocketbase.cpp:328
virtual KSocketAddress localAddress() const
Returns this socket's local address.
Definition: k3socketdevice.cpp:568
void bound(const KNetwork::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: k3clientsocketbase.cpp:364
virtual void enableRead(bool enable)
Enables the emission of the readyRead signal.
Definition: k3clientsocketbase.cpp:369
virtual qint64 waitForMore(int msecs, bool *timeout=0L)
Waits up to msecs for more data to be available on this socket.
Definition: k3socketdevice.cpp:451
virtual void stateChanging(SocketState newState)
This function is called by setState() whenever the state changes.
Definition: k3clientsocketbase.cpp:429
void setFamily(int families)
Sets the allowed families for the resolutions.
Definition: k3clientsocketbase.cpp:127
KResolver & peerResolver() const
Returns the internal KResolver object used for looking up the peer host name and service.
Definition: k3clientsocketbase.cpp:93
virtual qint64 waitForMore(int msecs, bool *timeout=0L)
Waits for more data.
Definition: k3clientsocketbase.cpp:304
virtual qint64 bytesAvailable() const
Returns the number of bytes available on this socket.
Definition: k3clientsocketbase.cpp:296
virtual qint64 bytesAvailable() const
Returns the number of bytes available for reading without blocking.
Definition: k3socketdevice.cpp:439
virtual void enableWrite(bool enable)
Enables the emission of the readyWrite signal.
Definition: k3clientsocketbase.cpp:384
KSocketDevice * socketDevice() const
Retrieves the socket implementation used on this socket.
Definition: k3socketbase.cpp:148
void connected(const KNetwork::KResolverEntry &remote)
This socket is emitted when the socket successfully connects to a remote address. ...
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: k3clientsocketbase.cpp:400
Definition: k3resolver.h:371
This file is part of the KDE documentation.
Documentation copyright © 1996-2016 The KDE developers.
Generated on Wed Oct 19 2016 23:23:31 by doxygen 1.8.12 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2016 The KDE developers.
Generated on Wed Oct 19 2016 23:23:31 by doxygen 1.8.12 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.