QLocalSocket

#include <QtNetwork/QLocalSocket>

More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QLocalSocket


Overview

Inheritance

QIODevice
QLocalSocket

Public Types Index

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

enum OpenModeFlag

NotOpen 0x0000, ReadOnly 0x0001, WriteOnly 0x0002, ReadWrite ReadOnly | WriteOnly, Append 0x0004, Truncate 0x0008, Text 0x0010, Unbuffered 0x0020

Public Functions Index

QLocalSocket (QObject *parent=0)
~QLocalSocket ()
voidabort ()
virtual qint64bytesAvailable () const
virtual qint64bytesToWrite () const
virtual boolcanReadLine () const
virtual voidclose ()
voidconnectToServer (const QString &name, OpenMode openMode=ReadWrite)
voiddisconnectFromServer ()
LocalSocketErrorerror () const
boolflush ()
QStringfullServerName () const
virtual boolisSequential () const
boolisValid () const
qint64readBufferSize () const
QStringserverName () const
voidsetReadBufferSize (qint64 size)
boolsetSocketDescriptor (quintptr socketDescriptor, LocalSocketState socketState=ConnectedState, OpenMode openMode=ReadWrite)
quintptrsocketDescriptor () const
LocalSocketStatestate () const
virtual boolwaitForBytesWritten (int msecs=30000)
boolwaitForConnected (int msecs=30000)
boolwaitForDisconnected (int msecs=30000)
virtual boolwaitForReadyRead (int msecs=30000)
virtual boolatEnd () const Inherited
QStringerrorString () const Inherited
boolgetChar (char *c)Inherited
boolisOpen () const Inherited
boolisReadable () const Inherited
boolisTextModeEnabled () const Inherited
boolisWritable () const Inherited
virtual boolopen (OpenMode mode)Inherited
OpenModeopenMode () const Inherited
qint64peek (char *data, qint64 maxlen)Inherited
QByteArraypeek (qint64 maxlen)Inherited
virtual qint64pos () const Inherited
boolputChar (char c)Inherited
QIODevice ()Inherited
QIODevice (QObject *parent)Inherited
qint64read (char *data, qint64 maxlen)Inherited
QByteArrayread (qint64 maxlen)Inherited
QByteArrayreadAll ()Inherited
qint64readLine (char *data, qint64 maxlen)Inherited
QByteArrayreadLine (qint64 maxlen=0)Inherited
virtual boolreset ()Inherited
virtual boolseek (qint64 pos)Inherited
voidsetTextModeEnabled (bool enabled)Inherited
virtual qint64size () const Inherited
voidungetChar (char c)Inherited
qint64write (const char *data, qint64 len)Inherited
qint64write (const char *data)Inherited
qint64write (const QByteArray &data)Inherited

Protected Functions Index

virtual qint64readData (char *, qint64)
virtual qint64writeData (const char *, qint64)
QIODevice (QIODevicePrivate &dd, QObject *parent=0)Inherited
virtual qint64readLineData (char *data, qint64 maxlen)Inherited
voidsetErrorString (const QString &errorString)Inherited
voidsetOpenMode (OpenMode openMode)Inherited

Signals Index

voidconnected ()
voiddisconnected ()
voiderror (QLocalSocket::LocalSocketError socketError)
voidstateChanged (QLocalSocket::LocalSocketState socketState)
voidaboutToClose ()Inherited
voidbytesWritten (qint64 bytes)Inherited
voidreadChannelFinished ()Inherited
voidreadyRead ()Inherited

Public Types

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

LocalSocketState

UnconnectedState QAbstractSocket::UnconnectedState
ConnectingState QAbstractSocket::ConnectingState
ConnectedState QAbstractSocket::ConnectedState
ClosingState QAbstractSocket::ClosingState

OpenModeFlag Inherited

NotOpen 0x0000
ReadOnly 0x0001
WriteOnly 0x0002
ReadWrite ReadOnly | WriteOnly
Append 0x0004
Truncate 0x0008
Text 0x0010
Unbuffered 0x0020

Public Functions

QLocalSocket (

~QLocalSocket ()

Destructor.

void abort ()

virtual qint64 bytesAvailable ()

virtual qint64 bytesToWrite ()

virtual bool canReadLine ()

virtual void close ()

void connectToServer (
  • const QString &name,
  • OpenModeopenMode )

void disconnectFromServer ()

LocalSocketError error ()

bool flush ()

QString fullServerName ()

virtual bool isSequential ()

bool isValid ()

qint64 readBufferSize ()

QString serverName ()

void setReadBufferSize (
  • qint64size)

bool setSocketDescriptor (
  • quintptrsocketDescriptor,
  • LocalSocketStatesocketState,
  • OpenModeopenMode )

quintptr socketDescriptor ()

LocalSocketState state ()

virtual bool waitForBytesWritten (
  • intmsecs)

bool waitForConnected (
  • intmsecs)

bool waitForDisconnected (
  • intmsecs)

virtual bool waitForReadyRead (
  • intmsecs)

virtual bool atEnd ()Inherited

QString errorString ()Inherited

bool getChar (
  • char *c)
Inherited

bool isOpen ()Inherited

bool isReadable ()Inherited

bool isTextModeEnabled ()Inherited

bool isWritable ()Inherited

virtual bool open (
  • OpenModemode)
Inherited

OpenMode openMode ()Inherited

qint64 peek (
  • char *data,
  • qint64maxlen )
Inherited

QByteArray peek (
  • qint64maxlen)
Inherited

virtual qint64 pos ()Inherited

bool putChar (
  • charc)
Inherited

QIODevice ()Inherited

QIODevice (Inherited

qint64 read (
  • char *data,
  • qint64maxlen )
Inherited

QByteArray read (
  • qint64maxlen)
Inherited

QByteArray readAll ()Inherited

qint64 readLine (
  • char *data,
  • qint64maxlen )
Inherited

QByteArray readLine (
  • qint64maxlen)
Inherited

virtual bool reset ()Inherited

virtual bool seek (
  • qint64pos)
Inherited

void setTextModeEnabled (
  • boolenabled)
Inherited

virtual qint64 size ()Inherited

void ungetChar (
  • charc)
Inherited

qint64 write (
  • const char *data,
  • qint64len )
Inherited

qint64 write (
  • const char *data)
Inherited

qint64 write (Inherited

Protected Functions

virtual qint64 readData (
  • char *,
  • qint64 )

virtual qint64 writeData (
  • const char *,
  • qint64 )

QIODevice (
  • QIODevicePrivate &dd,
  • QObject *parent )
Inherited

virtual qint64 readLineData (
  • char *data,
  • qint64maxlen )
Inherited

void setErrorString (Inherited

void setOpenMode (
  • OpenModeopenMode)
Inherited

Signals

void connected ()

void disconnected ()

void error (
  • QLocalSocket::LocalSocketErrorsocketError)

void stateChanged (
  • QLocalSocket::LocalSocketStatesocketState)

void aboutToClose ()Inherited

void bytesWritten (
  • qint64bytes)
Inherited

void readChannelFinished ()Inherited

void readyRead ()Inherited

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus