TLI_Acceptor.cpp File Reference

#include "ace/TLI_Acceptor.h"
#include "ace/Log_Msg.h"
#include "ace/ACE.h"
#include "ace/OS_NS_string.h"
#include "ace/OS_Memory.h"

Include dependency graph for TLI_Acceptor.cpp:

Include dependency graph

Go to the source code of this file.

Classes

struct  ACE_TLI_Request
class  ACE_TLI_Request_Queue

Functions

ACE_HANDLE open_new_endpoint (ACE_HANDLE listen_handle, const char dev[], struct t_call *callp, int rwf, ACE_Addr *remote_sap=0)


Function Documentation

ACE_HANDLE open_new_endpoint ACE_HANDLE  listen_handle,
const char  dev[],
struct t_call *  callp,
int  rwf,
ACE_Addr remote_sap = 0
[static]
 

Definition at line 132 of file TLI_Acceptor.cpp.

References ACE_TRACE, ACE_Addr::get_addr(), ACE_Addr::get_size(), ACE_OS::ioctl(), ACE_OS::t_bind(), t_bind(), ACE_OS::t_open(), and ACE_OS::t_snddis().

Referenced by ACE_TLI_Acceptor::accept(), and ACE_TLI_Request_Queue::enqueue().

00137 {
00138   ACE_TRACE ("open_new_endpoint");
00139   ACE_HANDLE fd = ACE_OS::t_open ((char *) dev,
00140                                   O_RDWR,
00141                                   0);
00142 
00143    struct t_bind req, *req_p = 0;
00144    if (remote_sap != 0)
00145      {
00146        req.qlen = 0;
00147        req.addr.buf = (char *) remote_sap->get_addr ();
00148        req.addr.len = remote_sap->get_size ();
00149        req.addr.maxlen = remote_sap->get_size ();
00150        req_p = &req;
00151      }
00152 
00153   if (fd == ACE_INVALID_HANDLE
00154       || ACE_OS::t_bind (fd, req_p, 0) == -1)
00155     fd = ACE_INVALID_HANDLE;
00156 #if defined (I_PUSH) && !defined (ACE_HAS_FORE_ATM_XTI)
00157   else if (rwf != 0 && ACE_OS::ioctl (fd,
00158                                       I_PUSH,
00159                                       const_cast<char *> ("tirdwr"))
00160                                       == ACE_INVALID_HANDLE)
00161     fd = ACE_INVALID_HANDLE;
00162 #else
00163   ACE_UNUSED_ARG(rwf);
00164 #endif /* I_PUSH */
00165 
00166   if (fd == ACE_INVALID_HANDLE)
00167     ACE_OS::t_snddis (listen_handle,
00168                       callp);
00169   return fd;
00170 }


Generated on Thu Nov 9 11:15:15 2006 for ACE by doxygen 1.3.6