# kio Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KIO::Connection Class Reference

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

`#include <connection.h>`

Inheritance diagram for KIO::Connection:

[legend]
Collaboration diagram for KIO::Connection:

[legend]
List of all members.

## Public Member Functions

void | init (KSocket *sock)
void | init (int fd_in, int fd_out)
void | connect (QObject *receiver=0, const char *member=0)
void | close ()
int | fd_from () const
int | fd_to () const
bool | inited () const
void | send (int cmd, const QByteArray &arr=QByteArray())
bool | sendnow (int _cmd, const QByteArray &data)
int | read (int *_cmd, QByteArray &)
| Receive data.
void | suspend ()
| Don't handle incoming data until resumed.
void | resume ()
| Resume handling of incoming data.
bool | suspended () const
| Returns status of connection.

## 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 46 of file connection.h.

## Member Function Documentation

int Connection::read | ( | int * | _cmd,
|  | QByteArray & |
| ) |

Receive data.

Returns:
  >=0 indicates the received data size upon success -1 indicates error

Definition at line 197 of file connection.cpp.

Referenced by KIO::SlaveBase::mimeType(), and KIO::SlaveBase::waitForAnswer().

void Connection::suspend | ( |  | ) |

| Don't handle incoming data until resumed. Definition at line 64 of file connection.cpp. References QSocketNotifier::setEnabled().

void Connection::resume | ( |  | ) |

| Resume handling of incoming data. Definition at line 71 of file connection.cpp. References QSocketNotifier::setEnabled().

bool KIO::Connection::suspended | ( |  | ) | const`[inline]`

| Returns status of connection. Definition at line 90 of file connection.h.

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

- connection.h
- connection.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:25:17 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001