#include <XTI_ATM_Mcast.h>
Inheritance diagram for ACE_XTI_ATM_Mcast:


Public Types | |
| typedef ACE_ATM_Addr | PEER_ADDR |
| typedef ACE_TLI_Stream | PEER_STREAM |
Public Methods | |
| ACE_XTI_ATM_Mcast (void) | |
| Default constructor. More... | |
| ACE_XTI_ATM_Mcast (ACE_TLI_Stream &new_stream, const ACE_Addr &remote_sap, ACE_Time_Value *timeout=0, const ACE_Addr &local_sap=ACE_Addr::sap_any, int reuse_addr=0, int flags=O_RDWR, int perms=0, const char device[]=ACE_XTI_ATM_DEVICE, struct t_info *info=0, int rw_flag=1, struct netbuf *udata=0, struct netbuf *opt=0) | |
| int | connect (ACE_TLI_Stream &new_stream, const ACE_Addr &remote_sap, ACE_Time_Value *timeout=0, const ACE_Addr &local_sap=ACE_Addr::sap_any, int reuse_addr=0, int flags=O_RDWR, int perms=0, const char device[]=ACE_XTI_ATM_DEVICE, struct t_info *info=0, int rw_flag=1, struct netbuf *udata=0, struct netbuf *opt=0) |
| int | add_leaf (ACE_TLI_Stream ¤t_stream, const ACE_Addr &remote_sap, ACE_INT32 leaf_id, ACE_Time_Value *timeout=0) |
| void | dump (void) const |
| Dump the state of an object. More... | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. More... | |
Definition at line 35 of file XTI_ATM_Mcast.h.
|
|
Reimplemented from ACE_TLI_Connector. Definition at line 115 of file XTI_ATM_Mcast.h. |
|
|
Reimplemented from ACE_TLI_Connector. Definition at line 116 of file XTI_ATM_Mcast.h. |
|
|
Default constructor.
Definition at line 23 of file XTI_ATM_Mcast.cpp. References ACE_TRACE.
00024 {
00025 ACE_TRACE ("ACE_XTI_ATM_Mcast::ACE_XTI_ATM_Mcast");
00026 }
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Actively connect and produce a <new_stream> if things go well. The <remote_sap> is the address that we are trying to connect with. The <timeout> is the amount of time to wait to connect. If it's 0 then we block indefinitely. If *timeout == {0, 0} then the connection is done using non-blocking mode. In this case, if the connection can't be made immediately the value of -1 is returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then this is the amount of time to wait before timing out. If the time expires before the connection is made <errno == ETIME>. The <local_sap> is the value of local address to bind to. If it's the default value of <ACE_Addr::sap_any> then the user is letting the OS do the binding. If <reuse_addr> == 1 then the <local_addr> is reused, even if it hasn't been cleanedup yet. Definition at line 7 of file XTI_ATM_Mcast.i. References ACE_ERROR, ACE_LIB_TEXT, ACE_TRACE, connect, ETIME, EWOULDBLOCK, and LM_ERROR.
00019 {
00020 ACE_TRACE ("ACE_XTI_ATM_Mcast::ACE_XTI_ATM_Mcast");
00021 if (this->connect (new_stream, remote_sap, timeout, local_sap, reuse_addr,
00022 flags, perms, device,
00023 info, rw_flag,
00024 udata, opt) == ACE_INVALID_HANDLE
00025 && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
00026 ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_TLI_Stream::ACE_TLI_Stream")));
00027 }
|
|
||||||||||||||||||||
|
Actively add a leaf to the currently connected stream (i.e., multicast). The <remote_sap> is the address of the leaf that we are trying to add. The <timeout> is the amount of time to wait to connect. If it's 0 then we block indefinitely. If *timeout == {0, 0} then the connection is done using non-blocking mode. In this case, if the connection can't be made immediately the value of -1 is returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then this is the amount of time to wait before timing out. If the time expires before the connection is made <errno == ETIME>. Definition at line 31 of file XTI_ATM_Mcast.cpp. References ACE_TRACE, ACE_TLI_Connector::complete, ACE_Addr::get_addr, ACE_IPC_SAP::get_handle, ACE_Addr::get_size, and ACE_OS_TLI::t_look.
00035 {
00036 ACE_TRACE ("ACE_XTI_ATM_Mcast::add_leaf");
00037
00038 struct netbuf call_req;
00039 memset(&call_req, 0, sizeof(call_req));
00040 call_req.len = remote_sap.get_size ();
00041 call_req.buf = (char *)remote_sap.get_addr ();
00042
00043 if (::t_addleaf(current_stream.get_handle(),
00044 leaf_id,
00045 &call_req) < 0)
00046 {
00047 // Check for asynchronous event
00048 if (t_errno == TLOOK)
00049 {
00050 int event;
00051 event = ACE_OS::t_look(current_stream.get_handle());
00052 if (event != TNODATA && event != T_DATA)
00053 return -1;
00054 else
00055 // If this doesn't work for asynchronous calls we need to call
00056 // the XTI/ATM t_rcvleafchange() function to check for t_addleaf
00057 // completion.
00058 return complete (current_stream, 0, timeout);
00059 }
00060 else
00061 return -1;
00062 }
00063
00064 return 0;
00065 }
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Actively connect and produce a <new_stream> if things go well. The <remote_sap> is the address that we are trying to connect with. The <timeout> is the amount of time to wait to connect. If it's 0 then we block indefinitely. If *timeout == {0, 0} then the connection is done using non-blocking mode. In this case, if the connection can't be made immediately the value of -1 is returned with <errno == EWOULDBLOCK>. If *timeout > {0, 0} then this is the amount of time to wait before timing out. If the time expires before the connection is made <errno == ETIME>. The <local_sap> is the value of local address to bind to. If it's the default value of <ACE_Addr::sap_any> then the user is letting the OS do the binding. If <reuse_addr> == 1 then the <local_addr> is reused, even if it hasn't been cleanedup yet. Reimplemented from ACE_TLI_Connector. Definition at line 36 of file XTI_ATM_Mcast.i. References ACE_TRACE, and ACE_TLI_Connector::connect. Referenced by ACE_XTI_ATM_Mcast.
00048 {
00049 ACE_TRACE ("ACE_XTI_ATM_Mcast::connect");
00050 return ACE_TLI_Connector::connect(new_stream,
00051 remote_sap,
00052 timeout,
00053 local_sap,
00054 reuse_addr,
00055 flags,
00056 perms,
00057 device,
00058 info,
00059 rw_flag,
00060 udata,
00061 opt);
00062 }
|
|
|
Dump the state of an object.
Reimplemented from ACE_TLI_Connector. Definition at line 18 of file XTI_ATM_Mcast.cpp. References ACE_TRACE.
00019 {
00020 ACE_TRACE ("ACE_XTI_ATM_Mcast::dump");
00021 }
|
|
|
Declare the dynamic allocation hooks.
Reimplemented from ACE_TLI_Connector. Definition at line 122 of file XTI_ATM_Mcast.h. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002