#include <POSIX_Proactor.h>
Inheritance diagram for ACE_POSIX_Proactor:


Public Types | |
| enum | Proactor_Type { PROACTOR_POSIX = 0, PROACTOR_AIOCB = 1, PROACTOR_SIG = 2, PROACTOR_SUN = 3, PROACTOR_CB = 4 } |
| enum | SystemType { OS_UNDEFINED = 0x0000, OS_WIN = 0x0100, OS_WIN_NT = OS_WIN | 0x0001, OS_WIN_2000 = OS_WIN | 0x0002, OS_SUN = 0x0200, OS_SUN_55 = OS_SUN | 0x0001, OS_SUN_56 = OS_SUN | 0x0002, OS_SUN_57 = OS_SUN | 0x0004, OS_SUN_58 = OS_SUN | 0x0008, OS_HPUX = 0x0400, OS_HPUX_11 = OS_HPUX | 0x0001, OS_LINUX = 0x0800, OS_FREEBSD = 0x1000, OS_IRIX = 0x2000, OS_OPENBSD = 0x4000 } |
| enum | Opcode { READ = 1, WRITE = 2 } |
Public Methods | |
| virtual Proactor_Type | get_impl_type (void) |
| virtual | ~ACE_POSIX_Proactor (void) |
| Virtual destructor. More... | |
| virtual int | close (void) |
| Close down the Proactor. More... | |
| virtual int | handle_events (ACE_Time_Value &wait_time)=0 |
| virtual int | handle_events (void)=0 |
| virtual int | post_completion (ACE_POSIX_Asynch_Result *result)=0 |
| virtual int | start_aio (ACE_POSIX_Asynch_Result *result, Opcode op)=0 |
| virtual int | cancel_aio (ACE_HANDLE h)=0 |
| ACE_Asynch_Pseudo_Task & | get_asynch_pseudo_task () |
| Task to process pseudo-asynchronous operations. More... | |
| virtual int | register_handle (ACE_HANDLE handle, const void *completion_key) |
| This function is a no-op function for Unix systems. Returns 0. More... | |
| int | wake_up_dispatch_threads (void) |
| This is a no-op on POSIX platforms. Returns 0. More... | |
| int | close_dispatch_threads (int wait) |
| This is a no-op on POSIX platforms. Returns 0. More... | |
| size_t | number_of_threads (void) const |
| This is a no-op on POSIX platforms. Returns 0. More... | |
| void | number_of_threads (size_t threads) |
| Set number of thread used as a parameter to CreatIoCompletionPort. More... | |
| virtual ACE_HANDLE | get_handle (void) const |
| This is a no-op in POSIX. Returns ACE_INVALID_HANDLE. More... | |
| virtual ACE_Asynch_Read_Stream_Impl * | create_asynch_read_stream (void) |
| Create the correct implementation class for doing Asynch_Read_Stream. More... | |
| virtual ACE_Asynch_Read_Stream_Result_Impl * | create_asynch_read_stream_result (ACE_Handler &handler, ACE_HANDLE handle, ACE_Message_Block &message_block, size_t bytes_to_read, const void *act, ACE_HANDLE event=ACE_INVALID_HANDLE, int priority=0, int signal_number=ACE_SIGRTMIN) |
| Create the correct implementation class for ACE_Asynch_Read_Stream::Result class. More... | |
| virtual ACE_Asynch_Write_Stream_Impl * | create_asynch_write_stream (void) |
| Create the correct implementation class for doing Asynch_Write_Stream. More... | |
| virtual ACE_Asynch_Write_Stream_Result_Impl * | create_asynch_write_stream_result (ACE_Handler &handler, ACE_HANDLE handle, ACE_Message_Block &message_block, size_t bytes_to_write, const void *act, ACE_HANDLE event=ACE_INVALID_HANDLE, int priority=0, int signal_number=ACE_SIGRTMIN) |
| Create the correct implementation class for ACE_Asynch_Write_Stream::Result. More... | |
| virtual ACE_Asynch_Read_File_Impl * | create_asynch_read_file (void) |
| Create the correct implementation class for doing Asynch_Read_File. More... | |
| virtual ACE_Asynch_Read_File_Result_Impl * | create_asynch_read_file_result (ACE_Handler &handler, ACE_HANDLE handle, ACE_Message_Block &message_block, size_t bytes_to_read, const void *act, u_long offset, u_long offset_high, ACE_HANDLE event=ACE_INVALID_HANDLE, int priority=0, int signal_number=ACE_SIGRTMIN) |
| Create the correct implementation class for ACE_Asynch_Read_File::Result. More... | |
| virtual ACE_Asynch_Write_File_Impl * | create_asynch_write_file (void) |
| Create the correct implementation class for doing Asynch_Write_File. More... | |
| virtual ACE_Asynch_Write_File_Result_Impl * | create_asynch_write_file_result (ACE_Handler &handler, ACE_HANDLE handle, ACE_Message_Block &message_block, size_t bytes_to_write, const void *act, u_long offset, u_long offset_high, ACE_HANDLE event=ACE_INVALID_HANDLE, int priority=0, int signal_number=ACE_SIGRTMIN) |
| Create the correct implementation class for ACE_Asynch_Write_File::Result. More... | |
| virtual ACE_Asynch_Read_Dgram_Impl * | create_asynch_read_dgram (void) |
| Create the correct implementation class for doing Asynch_Read_Dgram. More... | |
| virtual ACE_Asynch_Read_Dgram_Result_Impl * | create_asynch_read_dgram_result (ACE_Handler &handler, ACE_HANDLE handle, ACE_Message_Block *message_block, size_t bytes_to_read, int flags, int protocol_family, const void *act, ACE_HANDLE event=ACE_INVALID_HANDLE, int priority=0, int signal_number=ACE_SIGRTMIN) |
| Create the correct implementation class for ACE_Asynch_Read_Dgram::Result. More... | |
| virtual ACE_Asynch_Write_Dgram_Impl * | create_asynch_write_dgram (void) |
| Create the correct implementation class for doing Asynch_Write_Dgram. More... | |
| virtual ACE_Asynch_Write_Dgram_Result_Impl * | create_asynch_write_dgram_result (ACE_Handler &handler, ACE_HANDLE handle, ACE_Message_Block *message_block, size_t bytes_to_write, int flags, const void *act, ACE_HANDLE event=ACE_INVALID_HANDLE, int priority=0, int signal_number=ACE_SIGRTMIN) |
| Create the correct implementation class for ACE_Asynch_Write_Dgram::Result. More... | |
| virtual ACE_Asynch_Accept_Impl * | create_asynch_accept (void) |
| Create the correct implementation class for doing Asynch_Accept. More... | |
| virtual ACE_Asynch_Accept_Result_Impl * | create_asynch_accept_result (ACE_Handler &handler, ACE_HANDLE listen_handle, ACE_HANDLE accept_handle, ACE_Message_Block &message_block, size_t bytes_to_read, const void *act, ACE_HANDLE event=ACE_INVALID_HANDLE, int priority=0, int signal_number=ACE_SIGRTMIN) |
| Create the correct implementation class for ACE_Asynch_Accept::Result. More... | |
| virtual ACE_Asynch_Connect_Impl * | create_asynch_connect (void) |
| Create the correct implementation class for doing Asynch_Connect. More... | |
| virtual ACE_Asynch_Connect_Result_Impl * | create_asynch_connect_result (ACE_Handler &handler, ACE_HANDLE connect_handle, const void *act, ACE_HANDLE event=ACE_INVALID_HANDLE, int priority=0, int signal_number=ACE_SIGRTMIN) |
| Create the correct implementation class for ACE_Asynch_Connect::Result. More... | |
| virtual ACE_Asynch_Transmit_File_Impl * | create_asynch_transmit_file (void) |
| Create the correct implementation class for doing Asynch_Transmit_File. More... | |
| virtual ACE_Asynch_Transmit_File_Result_Impl * | create_asynch_transmit_file_result (ACE_Handler &handler, ACE_HANDLE socket, ACE_HANDLE file, ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer, size_t bytes_to_write, u_long offset, u_long offset_high, size_t bytes_per_send, u_long flags, const void *act, ACE_HANDLE event=ACE_INVALID_HANDLE, int priority=0, int signal_number=ACE_SIGRTMIN) |
| Create the correct implementation class for ACE_Asynch_Transmit_File::Result. More... | |
| virtual ACE_Asynch_Result_Impl * | create_asynch_timer (ACE_Handler &handler, const void *act, const ACE_Time_Value &tv, ACE_HANDLE event=ACE_INVALID_HANDLE, int priority=0, int signal_number=ACE_SIGRTMIN) |
| Create a timer result object which can be used with the Timer mechanism of the Proactor. More... | |
Protected Methods | |
| ACE_POSIX_Proactor (void) | |
| Constructor. More... | |
| void | application_specific_code (ACE_POSIX_Asynch_Result *asynch_result, size_t bytes_transferred, const void *completion_key, u_long error) |
| virtual int | post_wakeup_completions (int how_many) |
Protected Attributes | |
| ACE_Handler | wakeup_handler_ |
| Handler to handle the wakeups. This works in conjunction with the <ACE_Proactor::run_event_loop>. More... | |
| int | os_id_ |
Private Attributes | |
| ACE_Asynch_Pseudo_Task | pseudo_task_ |
| Task to process pseudo-asynchronous accept/connect. More... | |
There are two different strategies by which Proactor can get to know the completion of <aio> operations. One is based on Asynchronous I/O Control Blocks (AIOCB) where a list of AIOCBs are stored and completion status of the corresponding operations are queried on them. The other one is based on POSIX Real Time signals. This class abstracts out the common code needed for both the strategies. <ACE_AIOCB_Proactor> and <ACE_SIG_Proactor> specialize this class for each strategy.
Definition at line 53 of file POSIX_Proactor.h.
|
|
Definition at line 94 of file POSIX_Proactor.h. Referenced by ACE_POSIX_AIOCB_Proactor::start_aio.
|
|
|
Definition at line 56 of file POSIX_Proactor.h. Referenced by ACE_POSIX_AIOCB_Proactor::ACE_POSIX_AIOCB_Proactor, ACE_POSIX_AIOCB_Proactor::get_impl_type, and get_impl_type.
00057 {
00058 /// Base class type
00059 PROACTOR_POSIX = 0,
00060
00061 /// Aio_suspend() based
00062 PROACTOR_AIOCB = 1,
00063
00064 /// Signals notifications
00065 PROACTOR_SIG = 2,
00066
00067 /// SUN specific aiowait()
00068 PROACTOR_SUN = 3,
00069
00070 /// Callback notifications
00071 PROACTOR_CB = 4
00072 };
|
|
|
Definition at line 75 of file POSIX_Proactor.h.
00076 {
00077 OS_UNDEFINED= 0x0000,
00078 OS_WIN = 0x0100, // for future
00079 OS_WIN_NT = OS_WIN | 0x0001,
00080 OS_WIN_2000 = OS_WIN | 0x0002,
00081 OS_SUN = 0x0200, // Sun Solaris family
00082 OS_SUN_55 = OS_SUN | 0x0001,
00083 OS_SUN_56 = OS_SUN | 0x0002,
00084 OS_SUN_57 = OS_SUN | 0x0004,
00085 OS_SUN_58 = OS_SUN | 0x0008,
00086 OS_HPUX = 0x0400, // HPUX family
00087 OS_HPUX_11 = OS_HPUX | 0x0001,
00088 OS_LINUX = 0x0800, // Linux family
00089 OS_FREEBSD = 0x1000, // FreeBSD family
00090 OS_IRIX = 0x2000, // SGI IRIX family
00091 OS_OPENBSD = 0x4000 // OpenBSD familty
00092 };
|
|
|
Virtual destructor.
Definition at line 91 of file POSIX_Proactor.cpp. References close.
00092 {
00093 this->close ();
00094 }
|
|
|
Constructor.
Definition at line 52 of file POSIX_Proactor.cpp. References OS_HPUX, os_id_, OS_IRIX, OS_OPENBSD, OS_SUN, OS_SUN_56, OS_SUN_57, OS_SUN_58, ACE_OS_String::strcasecmp, and ACE_OS::sysinfo.
00053 : os_id_ (OS_UNDEFINED) 00054 { 00055 #if defined(sun) 00056 00057 os_id_ = OS_SUN; // set family 00058 00059 char Buf [32]; 00060 00061 ::memset(Buf,0,sizeof(Buf)); 00062 00063 ACE_OS::sysinfo (SI_RELEASE , Buf, sizeof(Buf)-1); 00064 00065 if (ACE_OS_String::strcasecmp (Buf , "5.6") == 0) 00066 os_id_ = OS_SUN_56; 00067 else if (ACE_OS_String::strcasecmp (Buf , "5.7") == 0) 00068 os_id_ = OS_SUN_57; 00069 else if (ACE_OS_String::strcasecmp (Buf , "5.8") == 0) 00070 os_id_ = OS_SUN_58; 00071 00072 #elif defined(HPUX) 00073 00074 os_id_ = OS_HPUX; // set family 00075 00076 #elif defined(__sgi) 00077 00078 os_id_ = OS_IRIX; // set family 00079 00080 #elif defined(__OpenBSD) 00081 00082 os_id_ = OS_OPENBSD; // set family 00083 00084 // do the same 00085 00086 //#else defined (LINUX, __FreeBSD__ ...) 00087 //setup here os_id_ 00088 #endif 00089 } |
|
||||||||||||||||||||
|
Protect against structured exceptions caused by user code when dispatching handles. The <completion_key> is not very useful compared to <AST> that can be associated each asynchronous operation. <completion_key> is implemented right now for the POSIX Proators. Definition at line 538 of file POSIX_Proactor.cpp. References ACE_SEH_FINALLY, ACE_SEH_TRY, and ACE_Asynch_Result_Impl::complete. Referenced by ACE_POSIX_AIOCB_Proactor::handle_events_i, and ACE_POSIX_AIOCB_Proactor::process_result_queue.
00542 {
00543 ACE_SEH_TRY
00544 {
00545 // Call completion hook
00546 asynch_result->complete (bytes_transferred,
00547 error ? 0 : 1,
00548 0, // No completion key.
00549 error);
00550 }
00551 ACE_SEH_FINALLY
00552 {
00553 // This is crucial to prevent memory leaks
00554 delete asynch_result;
00555 }
00556 }
|
|
|
Implemented in ACE_POSIX_AIOCB_Proactor. Referenced by ACE_POSIX_Asynch_Operation::cancel. |
|
|
Close down the Proactor.
Implements ACE_Proactor_Impl. Reimplemented in ACE_POSIX_AIOCB_Proactor. Definition at line 97 of file POSIX_Proactor.cpp. Referenced by ~ACE_POSIX_Proactor.
00098 {
00099 return 0;
00100 }
|
|
|
This is a no-op on POSIX platforms. Returns 0. @ Implements ACE_Proactor_Impl. Definition at line 118 of file POSIX_Proactor.cpp.
00119 {
00120 return 0;
00121 }
|
|
|
Create the correct implementation class for doing Asynch_Accept.
Implements ACE_Proactor_Impl. Definition at line 371 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN.
00372 {
00373 ACE_Asynch_Accept_Impl *implementation = 0;
00374 ACE_NEW_RETURN (implementation,
00375 ACE_POSIX_Asynch_Accept (this),
00376 0);
00377
00378 return implementation;
00379 }
|
|
||||||||||||||||||||||||||||||||||||||||
|
Create the correct implementation class for ACE_Asynch_Accept::Result.
Implements ACE_Proactor_Impl. Definition at line 382 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN, and ACE_Event_Handler::priority.
00391 {
00392 ACE_Asynch_Accept_Result_Impl *implementation;
00393 ACE_NEW_RETURN (implementation,
00394 ACE_POSIX_Asynch_Accept_Result (handler,
00395 listen_handle,
00396 accept_handle,
00397 message_block,
00398 bytes_to_read,
00399 act,
00400 event,
00401 priority,
00402 signal_number),
00403 0);
00404 return implementation;
00405 }
|
|
|
Create the correct implementation class for doing Asynch_Connect.
Implements ACE_Proactor_Impl. Definition at line 409 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN.
00410 {
00411 ACE_Asynch_Connect_Impl *implementation = 0;
00412 ACE_NEW_RETURN (implementation,
00413 ACE_POSIX_Asynch_Connect (this),
00414 0);
00415
00416 return implementation;
00417 }
|
|
||||||||||||||||||||||||||||
|
Create the correct implementation class for ACE_Asynch_Connect::Result.
Implements ACE_Proactor_Impl. Definition at line 420 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN, and ACE_Event_Handler::priority.
00426 {
00427 ACE_Asynch_Connect_Result_Impl *implementation;
00428 ACE_NEW_RETURN (implementation,
00429 ACE_POSIX_Asynch_Connect_Result (handler,
00430 connect_handle,
00431 act,
00432 event,
00433 priority,
00434 signal_number),
00435 0);
00436 return implementation;
00437 }
|
|
|
Create the correct implementation class for doing Asynch_Read_Dgram.
Implements ACE_Proactor_Impl. Definition at line 292 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN.
00293 {
00294 ACE_Asynch_Read_Dgram_Impl *implementation = 0;
00295 ACE_NEW_RETURN (implementation,
00296 ACE_POSIX_Asynch_Read_Dgram (this),
00297 0);
00298 return implementation;
00299 }
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Create the correct implementation class for ACE_Asynch_Read_Dgram::Result.
Implements ACE_Proactor_Impl. Definition at line 302 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN, and ACE_Event_Handler::priority.
00312 {
00313 ACE_Asynch_Read_Dgram_Result_Impl *implementation=0;
00314 ACE_NEW_RETURN (implementation,
00315 ACE_POSIX_Asynch_Read_Dgram_Result(handler,
00316 handle,
00317 message_block,
00318 bytes_to_read,
00319 flags,
00320 protocol_family,
00321 act,
00322 event,
00323 priority,
00324 signal_number),
00325 0);
00326
00327 return implementation;
00328 }
|
|
|
Create the correct implementation class for doing Asynch_Read_File.
Implements ACE_Proactor_Impl. Definition at line 214 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN.
00215 {
00216 ACE_Asynch_Read_File_Impl *implementation = 0;
00217 ACE_NEW_RETURN (implementation,
00218 ACE_POSIX_Asynch_Read_File (this),
00219 0);
00220 return implementation;
00221 }
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Create the correct implementation class for ACE_Asynch_Read_File::Result.
Implements ACE_Proactor_Impl. Definition at line 224 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN, and ACE_Event_Handler::priority.
00234 {
00235 ACE_Asynch_Read_File_Result_Impl *implementation;
00236 ACE_NEW_RETURN (implementation,
00237 ACE_POSIX_Asynch_Read_File_Result (handler,
00238 handle,
00239 message_block,
00240 bytes_to_read,
00241 act,
00242 offset,
00243 offset_high,
00244 event,
00245 priority,
00246 signal_number),
00247 0);
00248 return implementation;
00249 }
|
|
|
Create the correct implementation class for doing Asynch_Read_Stream.
Implements ACE_Proactor_Impl. Definition at line 144 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN.
00145 {
00146 ACE_Asynch_Read_Stream_Impl *implementation = 0;
00147 ACE_NEW_RETURN (implementation,
00148 ACE_POSIX_Asynch_Read_Stream (this),
00149 0);
00150 return implementation;
00151 }
|
|
||||||||||||||||||||||||||||||||||||
|
Create the correct implementation class for ACE_Asynch_Read_Stream::Result class.
Implements ACE_Proactor_Impl. Definition at line 154 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN, and ACE_Event_Handler::priority.
00162 {
00163 ACE_Asynch_Read_Stream_Result_Impl *implementation;
00164 ACE_NEW_RETURN (implementation,
00165 ACE_POSIX_Asynch_Read_Stream_Result (handler,
00166 handle,
00167 message_block,
00168 bytes_to_read,
00169 act,
00170 event,
00171 priority,
00172 signal_number),
00173 0);
00174 return implementation;
00175 }
|
|
||||||||||||||||||||||||||||
|
Create a timer result object which can be used with the Timer mechanism of the Proactor.
Implements ACE_Proactor_Impl. Definition at line 485 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN, and ACE_Event_Handler::priority.
00491 {
00492 ACE_Asynch_Result_Impl *implementation;
00493 ACE_NEW_RETURN (implementation,
00494 ACE_POSIX_Asynch_Timer (handler,
00495 act,
00496 tv,
00497 event,
00498 priority,
00499 signal_number),
00500 0);
00501 return implementation;
00502 }
|
|
|
Create the correct implementation class for doing Asynch_Transmit_File.
Implements ACE_Proactor_Impl. Definition at line 441 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN.
00442 {
00443 ACE_Asynch_Transmit_File_Impl *implementation = 0;
00444 ACE_NEW_RETURN (implementation,
00445 ACE_POSIX_Asynch_Transmit_File (this),
00446 0);
00447 return implementation;
00448 }
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Create the correct implementation class for ACE_Asynch_Transmit_File::Result.
Implements ACE_Proactor_Impl. Definition at line 451 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN, and ACE_Event_Handler::priority.
00464 {
00465 ACE_Asynch_Transmit_File_Result_Impl *implementation;
00466 ACE_NEW_RETURN (implementation,
00467 ACE_POSIX_Asynch_Transmit_File_Result (handler,
00468 socket,
00469 file,
00470 header_and_trailer,
00471 bytes_to_write,
00472 offset,
00473 offset_high,
00474 bytes_per_send,
00475 flags,
00476 act,
00477 event,
00478 priority,
00479 signal_number),
00480 0);
00481 return implementation;
00482 }
|
|
|
Create the correct implementation class for doing Asynch_Write_Dgram.
Implements ACE_Proactor_Impl. Definition at line 332 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN.
00333 {
00334 ACE_Asynch_Write_Dgram_Impl *implementation = 0;
00335 ACE_NEW_RETURN (implementation,
00336 ACE_POSIX_Asynch_Write_Dgram (this),
00337 0);
00338
00339 return implementation;
00340 }
|
|
||||||||||||||||||||||||||||||||||||||||
|
Create the correct implementation class for ACE_Asynch_Write_Dgram::Result.
Implements ACE_Proactor_Impl. Definition at line 343 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN, and ACE_Event_Handler::priority.
00352 {
00353 ACE_Asynch_Write_Dgram_Result_Impl *implementation=0;
00354 ACE_NEW_RETURN (implementation,
00355 ACE_POSIX_Asynch_Write_Dgram_Result(handler,
00356 handle,
00357 message_block,
00358 bytes_to_write,
00359 flags,
00360 act,
00361 event,
00362 priority,
00363 signal_number),
00364 0);
00365
00366 return implementation;
00367 }
|
|
|
Create the correct implementation class for doing Asynch_Write_File.
Implements ACE_Proactor_Impl. Definition at line 253 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN.
00254 {
00255 ACE_Asynch_Write_File_Impl *implementation = 0;
00256 ACE_NEW_RETURN (implementation,
00257 ACE_POSIX_Asynch_Write_File (this),
00258 0);
00259 return implementation;
00260 }
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Create the correct implementation class for ACE_Asynch_Write_File::Result.
Implements ACE_Proactor_Impl. Definition at line 263 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN, and ACE_Event_Handler::priority.
00273 {
00274 ACE_Asynch_Write_File_Result_Impl *implementation;
00275 ACE_NEW_RETURN (implementation,
00276 ACE_POSIX_Asynch_Write_File_Result (handler,
00277 handle,
00278 message_block,
00279 bytes_to_write,
00280 act,
00281 offset,
00282 offset_high,
00283 event,
00284 priority,
00285 signal_number),
00286 0);
00287 return implementation;
00288 }
|
|
|
Create the correct implementation class for doing Asynch_Write_Stream.
Implements ACE_Proactor_Impl. Definition at line 179 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN.
00180 {
00181 ACE_Asynch_Write_Stream_Impl *implementation = 0;
00182 ACE_NEW_RETURN (implementation,
00183 ACE_POSIX_Asynch_Write_Stream (this),
00184 0);
00185 return implementation;
00186 }
|
|
||||||||||||||||||||||||||||||||||||
|
Create the correct implementation class for ACE_Asynch_Write_Stream::Result.
Implements ACE_Proactor_Impl. Definition at line 189 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN, and ACE_Event_Handler::priority.
00197 {
00198 ACE_Asynch_Write_Stream_Result_Impl *implementation;
00199 ACE_NEW_RETURN (implementation,
00200 ACE_POSIX_Asynch_Write_Stream_Result (handler,
00201 handle,
00202 message_block,
00203 bytes_to_write,
00204 act,
00205 event,
00206 priority,
00207 signal_number),
00208 0);
00209 return implementation;
00210 }
|
|
|
Task to process pseudo-asynchronous operations.
Definition at line 27 of file POSIX_Proactor.i. References pseudo_task_. Referenced by ACE_POSIX_Asynch_Accept::accept, ACE_POSIX_AIOCB_Proactor::ACE_POSIX_AIOCB_Proactor, ACE_POSIX_CB_Proactor::ACE_POSIX_CB_Proactor, ACE_POSIX_Asynch_Connect::cancel, ACE_POSIX_Asynch_Accept::cancel, ACE_POSIX_AIOCB_Proactor::close, ACE_POSIX_Asynch_Connect::close, ACE_POSIX_Asynch_Accept::close, ACE_POSIX_Asynch_Connect::connect, ACE_POSIX_Asynch_Connect::handle_close, ACE_POSIX_Asynch_Accept::handle_close, ACE_POSIX_Asynch_Accept::handle_input, and ACE_POSIX_Asynch_Accept::open.
00028 {
00029 return this->pseudo_task_;
00030 }
|
|
|
This is a no-op in POSIX. Returns ACE_INVALID_HANDLE.
Implements ACE_Proactor_Impl. Definition at line 138 of file POSIX_Proactor.cpp. Referenced by ACE_POSIX_Asynch_Read_Stream::read, ACE_POSIX_Asynch_Write_File::write, and ACE_POSIX_Asynch_Write_Stream::write.
00139 {
00140 return ACE_INVALID_HANDLE;
00141 }
|
|
|
Reimplemented in ACE_POSIX_CB_Proactor. Definition at line 5 of file POSIX_Proactor.i. References PROACTOR_POSIX, and Proactor_Type.
00006 {
00007 return PROACTOR_POSIX;
00008 }
|
|
|
Block indefinitely until at least one event is dispatched. Dispatch a single set of events. If <wait_time> elapses before any events occur, return 0. Return 1 on success i.e., when a completion is dispatched, non-zero (-1) on errors and errno is set accordingly. Implements ACE_Proactor_Impl. Implemented in ACE_POSIX_CB_Proactor. |
|
|
Dispatch a single set of events. If <wait_time> elapses before any events occur, return 0. Return 1 on success i.e., when a completion is dispatched, non-zero (-1) on errors and errno is set accordingly. Implements ACE_Proactor_Impl. Implemented in ACE_POSIX_CB_Proactor. |
|
|
Set number of thread used as a parameter to CreatIoCompletionPort.
Implements ACE_Proactor_Impl. Definition at line 131 of file POSIX_Proactor.cpp.
00132 {
00133 // @@ Implement it.
00134 ACE_UNUSED_ARG (threads);
00135 }
|
|
|
This is a no-op on POSIX platforms. Returns 0. @ Implements ACE_Proactor_Impl. Definition at line 124 of file POSIX_Proactor.cpp.
00125 {
00126 // @@ Implement it.
00127 ACE_NOTSUP_RETURN (0);
00128 }
|
|
|
Post a result to the completion port of the Proactor. If errors occur, the result will be deleted by this method. If successful, the result will be deleted by the Proactor when the result is removed from the completion port. Therefore, the result should have been dynamically allocated and should be orphaned by the user once this method is called. Implemented in ACE_POSIX_AIOCB_Proactor. Referenced by ACE_POSIX_Asynch_Accept::cancel_uncompleted, ACE_POSIX_Asynch_Accept::handle_input, ACE_POSIX_Asynch_Result::post_completion, ACE_POSIX_Asynch_Connect::post_result, and post_wakeup_completions. |
|
|
Post <how_many> completions to the completion port so that all threads can wake up. This is used in conjunction with the <run_event_loop>. Implements ACE_Proactor_Impl. Definition at line 559 of file POSIX_Proactor.cpp. References ACE_NEW_RETURN, and post_completion.
00560 {
00561 ACE_POSIX_Wakeup_Completion *wakeup_completion = 0;
00562
00563 for (int ci = 0; ci < how_many; ci++)
00564 {
00565 ACE_NEW_RETURN (wakeup_completion,
00566 ACE_POSIX_Wakeup_Completion (this->wakeup_handler_),
00567 -1);
00568 if (this->post_completion (wakeup_completion) == -1)
00569 return -1;
00570 }
00571
00572 return 0;
00573 }
|
|
||||||||||||
|
This function is a no-op function for Unix systems. Returns 0.
Implements ACE_Proactor_Impl. Definition at line 103 of file POSIX_Proactor.cpp.
00105 {
00106 ACE_UNUSED_ARG (handle);
00107 ACE_UNUSED_ARG (completion_key);
00108 return 0;
00109 }
|
|
||||||||||||
|
Referenced by ACE_POSIX_Asynch_Read_File::read, ACE_POSIX_Asynch_Read_Stream::read, ACE_POSIX_Asynch_Write_File::write, and ACE_POSIX_Asynch_Write_Stream::write. |
|
|
This is a no-op on POSIX platforms. Returns 0. @ Implements ACE_Proactor_Impl. Definition at line 112 of file POSIX_Proactor.cpp.
00113 {
00114 return 0;
00115 }
|
|
|
Definition at line 308 of file POSIX_Proactor.h. Referenced by ACE_POSIX_Proactor. |
|
|
Task to process pseudo-asynchronous accept/connect.
Definition at line 312 of file POSIX_Proactor.h. Referenced by get_asynch_pseudo_task. |
|
|
Handler to handle the wakeups. This works in conjunction with the <ACE_Proactor::run_event_loop>.
Definition at line 307 of file POSIX_Proactor.h. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002