TipcConnServer


Name

TipcConnServer — user class for a server connection

Synopsis

TipcConnServer conn(logical_conn_name); 

Inheritance

Description

The TipcConnServer class calls the C API function TipcConnServerCreate at construction, passing the resulting T_IPC_CONN handle up to the TipcConn base class, where it is managed.

Caution

None

See Also

Tobj; see the TIBCO SmartSockets Application Programming Interface for information on TipcConnCreate and TipcConnServerCreate

Construction/Destruction

TipcConnServer::TipcConnServer

Syntax:
TipcConnServer(T_STR logical_conn_name); 
Remarks:
Create a TipcConnServer object with logical_conn_name.
C API:
TipcConnCreateServer

Public Member Function

TipcConnServer::Accept

Syntax:
TipcConn *Accept(); 
Remarks:
Accepts a connection from a client and returns a pointer to a new TipcConn object. It is your responsibility to delete this object when finished.
C API:
TipcConnAccept

Example

This code fragment creates a TCP server connection using port 5252 on the node named moose, waits for a client to connect, accepts that connection, and reads a packet from the client connection:

TipcConnServer *srv_conn = new TipcConnServer("tcp:moose:5252"); 
if (!srv_conn) { 
  // error 
} 
 
TipcConn *conn = srv_conn->Accept(); 
if (!conn) { 
  // error 
} 
 
TipcMsg msg; 
 
msg = conn->Next(10.0); 

TIBCO SmartSockets™ cxxipc Class Library
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com