#include <DEV_Connector.h>
Public Types | |
| typedef ACE_DEV_Addr | PEER_ADDR |
| typedef ACE_DEV_IO | PEER_STREAM |
Public Methods | |
| ACE_DEV_Connector (void) | |
| Default constructor. More... | |
| ACE_DEV_Connector (ACE_DEV_IO &new_io, const ACE_DEV_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) | |
| int | connect (ACE_DEV_IO &new_io, const ACE_DEV_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) |
| int | reset_new_handle (ACE_HANDLE handle) |
| Resets any event associations on this handle. More... | |
| 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 29 of file DEV_Connector.h.
|
|
Definition at line 95 of file DEV_Connector.h. |
|
|
Definition at line 96 of file DEV_Connector.h. |
|
|
Default constructor.
Definition at line 21 of file DEV_Connector.cpp. References ACE_TRACE.
00022 {
00023 ACE_TRACE ("ACE_DEV_Connector::ACE_DEV_Connector");
00024 }
|
|
||||||||||||||||||||||||||||||||
|
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 maximum 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. The <flags> and <perms> arguments are passed down to the <open> method. Definition at line 7 of file DEV_Connector.i. References ACE_ERROR, ACE_LIB_TEXT, ACE_TRACE, connect, ETIME, EWOULDBLOCK, ACE_DEV_Addr::get_path_name, ACE_IO_SAP::INVALID_HANDLE, and LM_ERROR.
00014 {
00015 ACE_TRACE ("ACE_DEV_Connector::ACE_DEV_Connector");
00016 if (this->connect (new_io, remote_sap, timeout, local_sap,
00017 reuse_addr, flags, perms) == ACE_IO_SAP::INVALID_HANDLE
00018 && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
00019 ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("address %s, %p\n"),
00020 remote_sap.get_path_name (), ACE_LIB_TEXT ("ACE_DEV_IO")));
00021 }
|
|
||||||||||||||||||||||||||||||||
|
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 maximum 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. The <flags> and <perms> arguments are passed down to the <open> method. Definition at line 27 of file DEV_Connector.cpp. References ACE_TRACE, ACE_DEV_IO::addr_, ACE_DEV_Addr::get_path_name, ACE_Handle_Ops::handle_timed_open, and ACE_IO_SAP::set_handle. Referenced by ACE_DEV_Connector.
00034 {
00035 ACE_TRACE ("ACE_DEV_Connector::connect");
00036
00037 ACE_HANDLE handle = ACE_Handle_Ops::handle_timed_open (timeout,
00038 remote_sap.get_path_name (),
00039 flags, perms);
00040 new_io.set_handle (handle);
00041 new_io.addr_ = remote_sap; // class copy.
00042 return handle == ACE_INVALID_HANDLE ? -1 : 0;
00043 }
|
|
|
Dump the state of an object.
Definition at line 16 of file DEV_Connector.cpp. References ACE_TRACE.
00017 {
00018 ACE_TRACE ("ACE_DEV_Connector::dump");
00019 }
|
|
|
Resets any event associations on this handle.
Definition at line 24 of file DEV_Connector.i.
00025 {
00026 ACE_UNUSED_ARG (handle);
00027 // Nothing to do here since the handle is not a socket
00028 return 0;
00029 }
|
|
|
Declare the dynamic allocation hooks.
Definition at line 92 of file DEV_Connector.h. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002