class Connection

Connection is an abstract class that provides an interface for sending Packets and receiving Packets. More...

Contains pure virtuals
Definition#include <sysadm/Connection.h>
Inherited byByteStreamConnection, RemoteShellConnection, SocketConnection
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Members

Protected Methods


Detailed Description

Connection is an abstract class that provides an interface for sending Packets and receiving Packets. A subclass must provide a sendPacket() method, and must call distributePacket() whenever a packet arrives.

static const char [] CONNECTION_SERVICE

For logging.

 Connection ()

Constructor.

Connection ()

[virtual]

Destructor.

void  sendPacket (const Packet& packet)

[pure virtual]

Send a packet.

String  remoteHostName ()

[virtual]

Get the name of the host at the other end of the connection.

void  setRemoteHostName (const String& host)

[virtual]

void  adoptPacketListener (const String& type, PacketListener* listener)

[virtual]

"listener"'s receivePacket() method will be called whenever a packet is received which has a type of "type". Only one listener at a time can be installed for a given "type".

PacketListener*  orphanPacketListener (const String& type)

[virtual]

Remove the PacketListener for "type".

void  distributePacket (const Packet& packet)

[protected virtual]

distributePacket() finds the PacketListener for this type of Packet and calls its receivePacket() method.


Generated by: rusty@irem on Mon Sep 18 18:07:52 2000, using kdoc 2.0a36.