- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Signals | Public Member Functions | Protected Member Functions

# QLocalSocket Class Reference

Search for all occurrences

## Detailed Description

Definition at line 58 of file qlocalsocket.h.

`#include <qlocalsocket.h>`

Inheritance diagram for QLocalSocket:
[legend]

List of all members.

## Public Types
enum | LocalSocketError { ConnectionRefusedError = QAbstractSocket::ConnectionRefusedError, PeerClosedError = QAbstractSocket::RemoteHostClosedError, ServerNotFoundError = QAbstractSocket::HostNotFoundError, SocketAccessError = QAbstractSocket::SocketAccessError, SocketResourceError = QAbstractSocket::SocketResourceError, SocketTimeoutError = QAbstractSocket::SocketTimeoutError, DatagramTooLargeError = QAbstractSocket::DatagramTooLargeError, ConnectionError = QAbstractSocket::NetworkError, UnsupportedSocketOperationError = QAbstractSocket::UnsupportedSocketOperationError, UnknownSocketError = QAbstractSocket::UnknownSocketError }
enum | LocalSocketState { UnconnectedState = QAbstractSocket::UnconnectedState, ConnectingState = QAbstractSocket::ConnectingState, ConnectedState = QAbstractSocket::ConnectedState, ClosingState = QAbstractSocket::ClosingState }
## Signals
void | connected ()
void | disconnected ()
void | error (QLocalSocket::LocalSocketError socketError)
void | stateChanged (QLocalSocket::LocalSocketState socketState)
## Public Member Functions
| QLocalSocket (QObject *parent=0)
| ~QLocalSocket ()
void | connectToServer (const QString &name, OpenMode openMode=ReadWrite)
void | disconnectFromServer ()
QString | serverName () const
QString | fullServerName () const
void | abort ()
virtual bool | isSequential () const
virtual qint64 | bytesAvailable () const
virtual qint64 | bytesToWrite () const
virtual bool | canReadLine () const
virtual void | close ()
LocalSocketError | error () const
bool | flush ()
bool | isValid () const
qint64 | readBufferSize () const
void | setReadBufferSize (qint64 size)
bool | setSocketDescriptor (quintptr socketDescriptor, LocalSocketState socketState=ConnectedState, OpenMode openMode=ReadWrite)
quintptr | socketDescriptor () const
LocalSocketState | state () const
bool | waitForBytesWritten (int msecs=30000)
bool | waitForConnected (int msecs=30000)
bool | waitForDisconnected (int msecs=30000)
bool | waitForReadyRead (int msecs=30000)
## Protected Member Functions
virtual qint64 | readData (char *, qint64)
virtual qint64 | writeData (const char *, qint64)

## Member Enumeration Documentation

enum LocalSocketError

Search for all occurrences

Enumerator:

  ConnectionRefusedError | Search for all occurrences
  PeerClosedError | Search for all occurrences
  ServerNotFoundError | Search for all occurrences
  SocketAccessError | Search for all occurrences
  SocketResourceError | Search for all occurrences
  SocketTimeoutError | Search for all occurrences
  DatagramTooLargeError | Search for all occurrences
  ConnectionError | Search for all occurrences
  UnsupportedSocketOperationError | Search for all occurrences
  UnknownSocketError | Search for all occurrences

Definition at line 64 of file qlocalsocket.h.

        {
            ConnectionRefusedError = QAbstractSocket::ConnectionRefusedError,
            PeerClosedError = QAbstractSocket::RemoteHostClosedError,
            ServerNotFoundError = QAbstractSocket::HostNotFoundError,
            SocketAccessError = QAbstractSocket::SocketAccessError,
            SocketResourceError = QAbstractSocket::SocketResourceError,
            SocketTimeoutError = QAbstractSocket::SocketTimeoutError,
            DatagramTooLargeError = QAbstractSocket::DatagramTooLargeError,
            ConnectionError = QAbstractSocket::NetworkError,
            UnsupportedSocketOperationError = QAbstractSocket::UnsupportedSocketOperationError,
            UnknownSocketError = QAbstractSocket::UnknownSocketError
        };

enum LocalSocketState

Search for all occurrences

Enumerator:

  UnconnectedState | Search for all occurrences
  ConnectingState | Search for all occurrences
  ConnectedState | Search for all occurrences
  ClosingState | Search for all occurrences

Definition at line 78 of file qlocalsocket.h.

        {
            UnconnectedState = QAbstractSocket::UnconnectedState,
            ConnectingState = QAbstractSocket::ConnectingState,
            ConnectedState = QAbstractSocket::ConnectedState,
            ClosingState = QAbstractSocket::ClosingState
        };

## Constructor & Destructor Documentation

QLocalSocket | ( | QObject * | parent = `0` | ) |

~QLocalSocket | ( |  | ) |

## Member Function Documentation

void connectToServer | ( | const QString & | name,
|  | OpenMode | openMode = `ReadWrite`
| ) |  |

Search for all occurrences

void disconnectFromServer | ( |  | ) |

Search for all occurrences

QString serverName | ( |  | ) | const

Search for all occurrences

QString fullServerName | ( |  | ) | const

Search for all occurrences

void abort | ( |  | ) |

Search for all occurrences

virtual bool isSequential | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QIODevice.

virtual qint64 bytesAvailable | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QIODevice.

virtual qint64 bytesToWrite | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QIODevice.

virtual bool canReadLine | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QIODevice.

virtual void close | ( |  | ) | `[virtual]`

Search for all occurrences

Reimplemented from QIODevice.

LocalSocketError error | ( |  | ) | const

Search for all occurrences

bool flush | ( |  | ) |

Search for all occurrences

bool isValid | ( |  | ) | const

Search for all occurrences

qint64 readBufferSize | ( |  | ) | const

Search for all occurrences

void setReadBufferSize | ( | qint64 | size | ) |

Search for all occurrences

bool setSocketDescriptor | ( | quintptr | socketDescriptor,
|  | LocalSocketState | socketState = `ConnectedState`,
|  | OpenMode | openMode = `ReadWrite`
| ) |  |

Search for all occurrences

quintptr socketDescriptor | ( |  | ) | const

Search for all occurrences

LocalSocketState state | ( |  | ) | const

Search for all occurrences

bool waitForBytesWritten | ( | int | msecs = `30000` | ) | `[virtual]`

Search for all occurrences

Reimplemented from QIODevice.

bool waitForConnected | ( | int | msecs = `30000` | ) |

Search for all occurrences

bool waitForDisconnected | ( | int | msecs = `30000` | ) |

Search for all occurrences

bool waitForReadyRead | ( | int | msecs = `30000` | ) | `[virtual]`

Search for all occurrences

Reimplemented from QIODevice.

void connected | ( |  | ) | `[signal]`

Search for all occurrences

void disconnected | ( |  | ) | `[signal]`

Search for all occurrences

void error | ( | QLocalSocket::LocalSocketError | socketError | ) | `[signal]`

Search for all occurrences

void stateChanged | ( | QLocalSocket::LocalSocketState | socketState | ) | `[signal]`

Search for all occurrences

virtual qint64 readData | ( | char * | ,
|  | qint64 |
| ) |  | `[protected, virtual]`

Search for all occurrences

Implements QIODevice.

virtual qint64 writeData | ( | const char * | ,
|  | qint64 |
| ) |  | `[protected, virtual]`

Search for all occurrences

Implements QIODevice.

The documentation for this class was generated from the following file:

- QtNetwork/qlocalsocket.h

QLocalSocket QLocalSocket QLocalSocket QLocalSocket QLocalSocket QLocalSocket QLocalSocket QLocalSocket QLocalSocket QLocalSocket
QLocalSocket QLocalSocket QLocalSocket QLocalSocket QLocalSocket QLocalSocket QLocalSocket QLocalSocket QLocalSocket QLocalSocket