KDECore
k3datagramsocket.cpp
Go to the documentation of this file.
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...
KSocketDevice * socketDevice() const
Retrieves the socket implementation used on this socket.
Definition: k3socketbase.cpp:148
SocketState state() const
Returns the current state for this socket.
Definition: k3clientsocketbase.cpp:66
virtual KDatagramPacket receive()
Receives one datagram from the stream.
Definition: k3datagramsocket.cpp:149
const KSocketAddress & address() const
Returns the socket address.
Definition: k3datagramsocket.h:138
QSocketNotifier * writeNotifier() const
Returns a socket notifier for output on this socket.
Definition: k3socketdevice.cpp:665
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...
virtual bool lookup()
Starts the lookup for peer and local hostnames as well as their services.
Definition: k3clientsocketbase.cpp:133
KResolver & localResolver() const
Returns the internal KResolver object used for looking up the local host name and service...
Definition: k3clientsocketbase.cpp:103
virtual void slotReadActivity()
This slot is connected to the read notifier's signal meaning the socket can read more data...
Definition: k3clientsocketbase.cpp:394
void gotError(int code)
This signal is emitted when this object finds an error.
virtual bool bind(const QString &node=QString(), const QString &service=QString())
Performs host lookups.
Definition: k3datagramsocket.cpp:72
void hostFound()
This signal is emitted when the lookup is successfully completed.
virtual bool connect(const QString &node=QString(), const QString &service=QString(), OpenMode mode=ReadWrite)
"Connects" this socket to the given address.
Definition: k3datagramsocket.cpp:100
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
QSocketNotifier * readNotifier() const
Returns a socket notifier for input on this socket.
Definition: k3socketdevice.cpp:647
void copyError()
Convenience function to set this object's error code to match that of the socket device.
Definition: k3clientsocketbase.cpp:453
virtual qint64 writeData(const char *data, qint64 len, const KSocketAddress *to)
Writes data to the socket.
Definition: k3datagramsocket.cpp:189
virtual bool create(int family, int type, int protocol)
Creates a socket but don't connect or bind anywhere.
Definition: k3socketdevice.cpp:261
const KResolverResults & peerResults() const
Returns the internal list of resolved results for the peer address.
Definition: k3clientsocketbase.cpp:98
void setState(SocketState state)
Sets the socket state to state.
Definition: k3clientsocketbase.cpp:71
Definition: k3resolver.h:346
void stateChanged(int newstate)
This signal is emitted whenever the socket state changes.
virtual qint64 bytesAvailable() const
Returns the number of bytes available on this socket.
Definition: k3clientsocketbase.cpp:296
qint64 write(const char *data, qint64 len)
Writes the given data to the socket.
Definition: k3socketbase.cpp:404
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 qint64 send(const KDatagramPacket &packet)
Sends one datagram into the stream.
Definition: k3datagramsocket.cpp:184
Definition: k3resolver.h:369
bool emitsReadyRead() const
Returns true if the readyRead signal is set to be emitted.
Definition: k3clientsocketbase.cpp:364
const KResolverResults & localResults() const
Returns the internal list of resolved results for the local address.
Definition: k3clientsocketbase.cpp:108
bool emitsReadyWrite() const
Returns true if the readyWrite signal is set to be emitted.
Definition: k3clientsocketbase.cpp:379
KResolver & peerResolver() const
Returns the internal KResolver object used for looking up the peer host name and service.
Definition: k3clientsocketbase.cpp:93
void connected(const KNetwork::KResolverEntry &remote)
This socket is emitted when the socket successfully connects to a remote address. ...
void setAddress(const QString &node, const QString &service)
Sets both the host and the service names.
Definition: k3resolver.cpp:360
virtual void slotWriteActivity()
This slot is connected to the write notifier's signal meaning the socket can write more data...
Definition: k3clientsocketbase.cpp:400
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.