The QLlcpServer class provides an NFC LLCP socket based server. More...
#include <QLlcpServer>
Inherits: QObject.
This class was introduced in Qt Mobility 1.2.
QLlcpServer ( QObject * parent = 0 ) | |
virtual | ~QLlcpServer () |
void | close () |
virtual bool | hasPendingConnections () const |
bool | isListening () const |
bool | listen ( const QString & serviceUri ) |
virtual QLlcpSocket * | nextPendingConnection () |
QLlcpSocket::SocketError | serverError () const |
quint8 | serverPort () const |
QString | serviceUri () const |
void | newConnection () |
The QLlcpServer class provides an NFC LLCP socket based server.
This class makes it possible to accept incoming LLCP socket connections.
Call listen() to have the server start listening for incoming connections on a specified port. The newConnection() signal is then emitted each time a client connects to the server.
Call nextPendingConnection() to accept the pending connection as a connected QLlcpSocket. The function returns a pointer to a QLlcpSocket that can be used for communicating with the client.
If an error occurs, serverError() returns the type of error, and errorString() can be called to get a human readable description of what happened.
When listening for connections, the port which the server is listening on is available through serverPort().
Calling close() makes QLlcpServer stop listening for incoming connections.
Constructs a new NFC LLCP server with parent.
Destroys the NFC LLCP server.
Stops listening for incoming connections.
Returns true if the server has a pending connection; otherwise returns false.
See also nextPendingConnection().
Returns true if the server is listening for incoming connections; otherwise returns false.
Tells the server to listen for incoming connections on serviceUri. If the server is currently listening then it will return false. Returns true on success; otherwise returns false.
serviceUri() will return the serviceUri that is passed into listen.
serverPort() will return the port that is assigned to the server.
See also serverPort(), isListening(), and close().
This signal is emitted every time a new connection is available.
See also hasPendingConnections() and nextPendingConnection().
Returns the next pending connection as a connected QLlcpSocket object.
The socket is created as a child of the server, which means that it is automatically deleted when the QLlcpServer object is destroyed. It is still a good idea to delete the object explicitly when you are done with it, to avoid wasting memory.
0 is returned if this function is called when there are no pending connections.
See also hasPendingConnections() and newConnection().
Returns the last error that occurred.
Returns the LLCP port associated with the service URI that the server is listening on.
Note: This call is not supported on all platforms and will return 0 on these platforms.
Returns the LLCP service URI that the server is listening on.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.