Defines the TCP/IP communications strategy that xmog_jvm uses to communicate with a server.
More...
#include <xmog_i_comm_tcp.h>
|
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) |
|
Defines the TCP/IP communications strategy that xmog_jvm uses to communicate with a server.
◆ 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
-
dest | The address of the peer. This must be a hostname:port string. |
timeout | Pointer 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
-
0 | for success |
-1 | for failure. |
Implements xmog_i_comm_strategy.
◆ disconnect()
virtual void xmog_i_comm_tcp::disconnect |
( |
void |
| ) |
|
|
virtual |
◆ 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
-
b | ACE_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
-
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
-
b | ACE_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
-
Implements xmog_i_comm_strategy.
The documentation for this class was generated from the following file: