QLlcpSocket Class ReferenceThe QLlcpSocket class provides an NFC LLCP socket. More... #include <QLlcpSocket> Inherits: QIODevice. This class was introduced in Qt Mobility 1.2. Public Types
Public Functions
Reimplemented Public Functions
Signals
Additional Inherited Members
Detailed DescriptionThe QLlcpSocket class provides an NFC LLCP socket. NFC LLCP protocol is a peer-to-peer communication protocol between two NFC compliant devices. Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QLlcpSocket::UnknownSocketError | QAbstractSocket::UnknownSocketError | An unidentified error has occurred. |
QLlcpSocket::RemoteHostClosedError | QAbstractSocket::RemoteHostClosedError | The remote host closed the connection. |
QLlcpSocket::SocketAccessError | QAbstractSocket::SocketAccessError | The socket operation failed because the application lacked the required privileges. |
QLlcpSocket::SocketResourceError | QAbstractSocket::SocketResourceError | The local system ran out of resources (e.g., too many sockets). |
This enum describes the different state in which a socket can be.
Constant | Value | Description |
---|---|---|
QLlcpSocket::UnconnectedState | QAbstractSocket::UnconnectedState | The socket is not connected. |
QLlcpSocket::ConnectingState | QAbstractSocket::ConnectingState | The socket has started establishing a connection. |
QLlcpSocket::ConnectedState | QAbstractSocket::ConnectedState | A connection is established. |
QLlcpSocket::ClosingState | QAbstractSocket::ClosingState | The socket is about to close. |
QLlcpSocket::BoundState | QAbstractSocket::BoundState | The socket is bound to a local port (for servers). |
QLlcpSocket::ListeningState | QAbstractSocket::ListeningState | The socket is listening for incoming connections (for internal use). |
Construct a new unconnected LLCP socket with parent.
Destroys the LLCP socket.
Binds the LLCP socket to local port. Returns true on success; otherwise returns false.
Reimplemented from QIODevice::bytesAvailable().
Reimplemented from QIODevice::canReadLine().
Reimplemented from QIODevice::close().
Disconnects the socket.
Connects to the service identified by the URI serviceUri on target.
This signal is emitted after connectToService() has been called and a connection has been successfully established.
See also connectToService() and disconnected().
Disconnects the socket.
This signal is emitted when the socket has been disconnected.
See also disconnectFromService().
Returns the type of error that last occurred.
This signal is emitted when an error occurs. The socketError parameter describes the error.
Returns true if at least one datagram (service data units) is waiting to be read; otherwise returns false.
See also pendingDatagramSize() and readDatagram().
Reimplemented from QIODevice::isSequential().
Always returns true.
Returns the size of the first pending datagram (service data unit). If there is no datagram available, this function returns -1.
See also hasPendingDatagrams() and readDatagram().
Receives a datagram no larger than maxSize bytes and stores it in data. The sender's details are stored in target and port (unless the pointers are 0).
Returns the size of the datagram on success; otherwise returns -1.
If maxSize is too small, the rest of the datagram will be lost. To avoid loss of data, call pendingDatagramSize() to determine the size of the pending datagram before attempting to read it. If maxSize is 0, the datagram will be discarded.
See also writeDatagram(), hasPendingDatagrams(), and pendingDatagramSize().
Returns the state of the socket.
This signal is emitted when the state of the socket changes. The socketState parameter describes the new state.
Reimplemented from QIODevice::waitForBytesWritten().
Waits until the socket is connected, up to msecs milliseconds. If the connection has been established, this function returns true; otherwise it returns false. In the case where it returns false, you can call error() to determine the cause of the error.
If msecs is -1, this function will not time out.
Waits until the socket is disconnected, up to msecs milliseconds. If the connection has been disconnected, this function returns true; otherwise it returns false. In the case where it returns false, you can call error() to determine the cause of the error.
If msecs is -1, this function will not time out.
Reimplemented from QIODevice::waitForReadyRead().
Sends the datagram at data of size size to the service that this socket is connected to. Returns the number of bytes sent on success; otherwise return -1;
Sends the datagram at data of size size to the service identified by the URI port on target. Returns the number of bytes sent on success; otherwise returns -1.
See also readDatagram().
This is an overloaded function.
Sends the datagram datagram to the service that this socket is connected to.
This is an overloaded function.
Sends the datagram datagram to the service identified by the URI port on target.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtmobility-1.2 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com