• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

  • TDEIO
  • Connection
Public Member Functions | Protected Slots | List of all members
TDEIO::Connection Class Reference

#include <connection.h>

Inherits TQObject.

Public Member Functions

 Connection ()
 
void init (TDESocket *sock)
 
void init (int fd_in, int fd_out)
 
void connect (TQObject *receiver=0, const char *member=0)
 
void close ()
 
int fd_from () const
 
int fd_to () const
 
bool inited () const
 
void send (int cmd, const TQByteArray &arr=TQByteArray())
 
bool sendnow (int _cmd, const TQByteArray &data)
 
int read (int *_cmd, TQByteArray &data)
 
void suspend ()
 
void resume ()
 
bool suspended () const
 

Protected Slots

void dequeue ()
 

Detailed Description

This class provides a simple means for IPC between two applications via a pipe.

It handles a queue of commands to be sent which makes it possible to queue data before an actual connection has been established.

Definition at line 48 of file connection.h.

Constructor & Destructor Documentation

Connection::Connection ( )

Creates a new connection.

See also
init()

Definition at line 55 of file connection.cpp.

Member Function Documentation

void Connection::close ( )

Closes the connection.

Definition at line 86 of file connection.cpp.

int TDEIO::Connection::fd_from ( ) const
inline

Returns the input file descriptor.

Returns
the input file descriptor

Definition at line 81 of file connection.h.

int TDEIO::Connection::fd_to ( ) const
inline

Returns the output file descriptor.

Returns
the output file descriptor

Definition at line 86 of file connection.h.

void Connection::init ( TDESocket *  sock)

Initialize this connection to use the given socket.

Parameters
sockthe socket to use
See also
inited()

Definition at line 131 of file connection.cpp.

void Connection::init ( int  fd_in,
int  fd_out 
)

Initialize the connection to use the given file descriptors.

Parameters
fd_inthe input file descriptor to use
fd_outthe output file descriptor to use
See also
inited()

Definition at line 151 of file connection.cpp.

bool TDEIO::Connection::inited ( ) const
inline

Checks whether the connection has been initialized.

Returns
true if the initialized
See also
init()

Definition at line 93 of file connection.h.

int Connection::read ( int *  _cmd,
TQByteArray &  data 
)

Receive data.

Parameters
_cmdthe received command will be written here
datathe received data will be written here
Returns
>=0 indicates the received data size upon success -1 indicates error

Definition at line 216 of file connection.cpp.

void Connection::resume ( )

Resume handling of incoming data.

Definition at line 79 of file connection.cpp.

void Connection::send ( int  cmd,
const TQByteArray &  arr = TQByteArray() 
)

Sends/queues the given command to be sent.

Parameters
cmdthe command to set
arrthe bytes to send

Definition at line 105 of file connection.cpp.

bool Connection::sendnow ( int  _cmd,
const TQByteArray &  data 
)

Sends the given command immediately.

Parameters
_cmdthe command to set
datathe bytes to send
Returns
true if successful, false otherwise

Definition at line 182 of file connection.cpp.

void Connection::suspend ( )

Don't handle incoming data until resumed.

Definition at line 72 of file connection.cpp.

bool TDEIO::Connection::suspended ( ) const
inline

Returns status of connection.

Returns
true if suspended, false otherwise

Definition at line 134 of file connection.h.


The documentation for this class was generated from the following files:
  • connection.h
  • connection.cpp

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.8.8
This website is maintained by Timothy Pearson.