Yate
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions
JBConnect Class Reference

A socket connector. More...

#include <yatejabber.h>

Inheritance diagram for JBConnect:
GenObject

List of all members.

Public Types

enum  Status { Start = 0, Address, Srv, Domain }

Public Member Functions

 JBConnect (const JBStream &stream)
virtual ~JBConnect ()
virtual void stopConnect ()
virtual const StringtoString () const

Static Public Attributes

static const TokenDict s_statusName []

Protected Member Functions

void connect ()

Detailed Description

A socket connector.

This class holds data used to connect an outgoing stream A descendant class should implement the thread run method


Constructor & Destructor Documentation

JBConnect ( const JBStream stream)

Constructor. Add itself to the stream's engine

Parameters:
streamThe stream to connect
virtual ~JBConnect ( ) [virtual]

Destructor. Remove from engine if still there


Member Function Documentation

void connect ( ) [protected]

Connect the socket. Retrieve ip/port from engine ant use them if valid or try to use SRV records returned by the given domain or use the domain's ip address and the default port given by the stream type. Notify the stream on termination. This method should be called from it's own thread

virtual void stopConnect ( ) [virtual]

Stop the thread. This method should be re-implemented

virtual const String& toString ( ) const [virtual]

Retrieve the stream name

Returns:
Stream name

Reimplemented from GenObject.


Member Data Documentation

const TokenDict s_statusName[] [static]

Status name dictionary


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