00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef ACE_TLI_ACCEPTOR_H
00015 #define ACE_TLI_ACCEPTOR_H
00016 #include "ace/pre.h"
00017
00018 #include "ace/TLI.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #include "ace/Time_Value.h"
00025 #include "ace/TLI_Stream.h"
00026
00027 #if defined (ACE_HAS_TLI)
00028
00029
00030 class ACE_TLI_Request_Queue;
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 class ACE_Export ACE_TLI_Acceptor : public ACE_TLI
00043 {
00044 public:
00045 friend class ACE_Request_Queue;
00046
00047
00048
00049 ACE_TLI_Acceptor (void);
00050
00051
00052 ACE_TLI_Acceptor (const ACE_Addr &remote_sap,
00053 int reuse_addr = 0,
00054 int oflag = O_RDWR,
00055 struct t_info *info = 0,
00056 int backlog = ACE_DEFAULT_BACKLOG,
00057 const char device[] = ACE_TLI_TCP_DEVICE);
00058
00059
00060 ACE_HANDLE open (const ACE_Addr &remote_sap,
00061 int reuse_addr = 0,
00062 int oflag = O_RDWR,
00063 struct t_info *info = 0,
00064 int backlog = ACE_DEFAULT_BACKLOG,
00065 const char device[] = ACE_TLI_TCP_DEVICE);
00066
00067
00068 int close (void);
00069
00070
00071
00072
00073
00074
00075
00076
00077 int accept (ACE_TLI_Stream &new_tli_sap,
00078 ACE_Addr *remote_addr = 0,
00079 ACE_Time_Value *timeout = 0,
00080 int restart = 1,
00081 int reset_new_handle = 0,
00082 int rwflag = 1,
00083 netbuf *udata = 0,
00084 netbuf *opt = 0);
00085
00086
00087 typedef ACE_INET_Addr PEER_ADDR;
00088 typedef ACE_TLI_Stream PEER_STREAM;
00089
00090
00091 void dump (void) const;
00092
00093
00094 ACE_ALLOC_HOOK_DECLARE;
00095
00096 private:
00097
00098 const char *device_;
00099
00100
00101 int backlog_;
00102
00103
00104 int rwflag_;
00105
00106
00107 int handle_async_event (int restart, int rwflag);
00108
00109
00110 ACE_TLI_Request_Queue *queue_;
00111
00112
00113 struct t_discon *disp_;
00114 };
00115
00116 #endif
00117 #include "ace/post.h"
00118 #endif