Codemesh Runtime v3 C++ API Reference  3.9.205
Public Member Functions | List of all members
xmog_i_comm_tcp Class Reference

Defines the TCP/IP communications strategy that xmog_jvm uses to communicate with a server. More...

#include <xmog_i_comm_tcp.h>

Inheritance diagram for xmog_i_comm_tcp:
Inheritance graph
[legend]
Collaboration diagram for xmog_i_comm_tcp:
Collaboration graph
[legend]

Public Member Functions

virtual int connect (const ACE_TCHAR *dest, const ACE_Time_Value *timeout=0)
 
virtual void disconnect (void)
 
virtual int send (ACE_Message_Block &b)
 
virtual int recv (ACE_Message_Block &b)
 
virtual ACE_HANDLE get_handle (void)
 

Detailed Description

Defines the TCP/IP communications strategy that xmog_jvm uses to communicate with a server.

Member Function Documentation

◆ connect()

virtual int xmog_i_comm_tcp::connect ( const ACE_TCHAR *  dest,
const ACE_Time_Value *  timeout = 0 
)
virtual

Connect to a peer identified by dest.

Parameters
destThe address of the peer. This must be a hostname:port string.
timeoutPointer to ACE_Time_Value containing the maximum amount of time (delta time) to wait for the connection to be established. The default is 0, meaning to block until the connection succeeds or fails.
Return values
0for success
-1for failure.

Implements xmog_i_comm_strategy.

◆ disconnect()

virtual void xmog_i_comm_tcp::disconnect ( void  )
virtual

Disconnect from the peer.

Implements xmog_i_comm_strategy.

◆ get_handle()

virtual ACE_HANDLE xmog_i_comm_tcp::get_handle ( void  )
virtual

Obtain the IPC handle for this strategy. This is a handle that can be registered with an ACE_Reactor for INPUT, OUTPUT events.

Implements xmog_i_comm_strategy.

◆ recv()

virtual int xmog_i_comm_tcp::recv ( ACE_Message_Block &  b)
virtual

Receive data into the specified ACE_Message_Block from the peer.

Parameters
bACE_Message_Block to store data. Data is placed starting at the block's wr_ptr. b.space() is used to get the max amount of data to receive. wr_ptr is updated to reflect received data.
Return values
0Success.
-1Failure.

Implements xmog_i_comm_strategy.

◆ send()

virtual int xmog_i_comm_tcp::send ( ACE_Message_Block &  b)
virtual

Send data in the specified ACE_Message_Block to the peer.

Parameters
bACE_Message_Block to send. Data is sent starting at the block's rd_ptr. b.length() is used to get the amount of data to send. rd_ptr is updated to reflect sent data.
Return values
0Success.
-1Failure.

Implements xmog_i_comm_strategy.


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

Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.