1 #include /**/ "ace/config-lite.h"
2 #include "ace/Proactor.h"
3 #if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
5 // This only works on Win32 platforms and on Unix platforms with aio
8 #include "ace/Auto_Ptr.h"
9 #include "ace/Proactor_Impl.h"
10 #include "ace/Object_Manager.h"
11 #include "ace/Task_T.h"
13 #if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_SVCCONF)
14 # include "ace/Service_Config.h"
15 #endif /* !ACE_HAS_WINCE && !ACE_LACKS_ACE_SVCCONF */
18 #include "ace/Task_T.h"
19 #include "ace/Log_Category.h"
20 #include "ace/Framework_Component.h"
22 #if defined (ACE_HAS_AIO_CALLS)
23 # include "ace/POSIX_Proactor.h"
24 # include "ace/POSIX_CB_Proactor.h"
25 #else /* !ACE_HAS_AIO_CALLS */
26 # include "ace/WIN32_Proactor.h"
27 #endif /* ACE_HAS_AIO_CALLS */
29 #if !defined (__ACE_INLINE__)
30 #include "ace/Proactor.inl"
31 #endif /* __ACE_INLINE__ */
33 #include "ace/Auto_Event.h"
35 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
37 /// Process-wide ACE_Proactor.
38 ACE_Proactor
*ACE_Proactor::proactor_
= 0;
40 /// Controls whether the Proactor is deleted when we shut down (we can
41 /// only delete it safely if we created it!)
42 bool ACE_Proactor::delete_proactor_
= false;
45 * @class ACE_Proactor_Timer_Handler
47 * @brief A Handler for timer. It helps in the management of timers
48 * registered with the Proactor.
50 * This object has a thread that will wait on the earliest time
51 * in a list of timers and an event. When a timer expires, the
52 * thread will post a completion event on the port and go back
53 * to waiting on the timer queue and event. If the event is
54 * signaled, the thread will refresh the time it is currently
55 * waiting on (in case the earliest time has changed).
57 class ACE_Proactor_Timer_Handler
: public ACE_Task
<ACE_NULL_SYNCH
>
61 explicit ACE_Proactor_Timer_Handler (ACE_Proactor
&proactor
);
64 virtual ~ACE_Proactor_Timer_Handler (void);
66 /// Proactor calls this to shut down the timer handler
67 /// gracefully. Just calling the destructor alone doesnt do what
68 /// <destroy> does. <destroy> make sure the thread exits properly.
71 /// Proactor calls this to refresh the timer event thread, to wake
72 /// up the thread from a sleep. This is needed to make the thread
73 /// recompute its sleep time after changes to the timer queue.
77 /// Run by a daemon thread to handle deferred processing. In other
78 /// words, this method will do the waiting on the earliest timer and
80 virtual int svc (void);
83 ACE_Auto_Event timer_event_
;
86 ACE_Proactor
&proactor_
;
88 /// Flag used to indicate when we are shutting down.
92 ACE_Proactor_Timer_Handler::ACE_Proactor_Timer_Handler (ACE_Proactor
&proactor
)
93 : ACE_Task
<ACE_NULL_SYNCH
> (&proactor
.thr_mgr_
),
99 ACE_Proactor_Timer_Handler::~ACE_Proactor_Timer_Handler (void)
105 ACE_Proactor_Timer_Handler::destroy (void)
107 // Mark for closing down.
108 this->shutting_down_
= 1;
110 // Signal timer event.
111 this->timer_event_
.signal ();
113 // Wait for the Timer Handler thread to exit.
119 ACE_Proactor_Timer_Handler::signal (void)
121 return this->timer_event_
.signal ();
125 ACE_Proactor_Timer_Handler::svc (void)
127 ACE_Time_Value absolute_time
;
128 ACE_Time_Value relative_time
;
131 while (this->shutting_down_
== 0)
133 // Check whether the timer queue has any items in it.
134 if (this->proactor_
.timer_queue ()->is_empty () == 0)
136 // Get the earliest absolute time.
137 absolute_time
= this->proactor_
.timer_queue ()->earliest_time ();
139 // Get current time from timer queue since we don't know
140 // which <gettimeofday> was used.
141 ACE_Time_Value cur_time
=
142 this->proactor_
.timer_queue ()->gettimeofday ();
144 // Compare absolute time with curent time received from the
146 if (absolute_time
> cur_time
)
147 relative_time
= absolute_time
- cur_time
;
149 relative_time
= ACE_Time_Value::zero
;
151 // Block for relative time.
152 result
= this->timer_event_
.wait (&relative_time
, 0);
155 // The timer queue has no entries, so wait indefinitely.
156 result
= this->timer_event_
.wait ();
158 // Check for timer expiries.
164 // timeout: expire timers
165 this->proactor_
.timer_queue ()->expire ();
169 ACELIB_ERROR_RETURN ((LM_ERROR
,
170 ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
171 ACE_TEXT ("ACE_Proactor_Timer_Handler::svc:wait failed")),
179 // *********************************************************************
181 ACE_Proactor_Handle_Timeout_Upcall::ACE_Proactor_Handle_Timeout_Upcall (void)
187 ACE_Proactor_Handle_Timeout_Upcall::registration (ACE_Proactor_Timer_Queue
&,
188 ACE_Handler
* handler
,
191 handler
->proactor(proactor_
);
196 ACE_Proactor_Handle_Timeout_Upcall::preinvoke (ACE_Proactor_Timer_Queue
&,
200 const ACE_Time_Value
&,
207 ACE_Proactor_Handle_Timeout_Upcall::postinvoke (ACE_Proactor_Timer_Queue
&,
211 const ACE_Time_Value
&,
218 ACE_Proactor_Handle_Timeout_Upcall::timeout (ACE_Proactor_Timer_Queue
&,
219 ACE_Handler
*handler
,
222 const ACE_Time_Value
&time
)
224 if (this->proactor_
== 0)
225 ACELIB_ERROR_RETURN ((LM_ERROR
,
226 ACE_TEXT ("(%t) No Proactor set in ACE_Proactor_Handle_Timeout_Upcall,")
227 ACE_TEXT (" no completion port to post timeout to?!@\n")),
230 // Create the Asynch_Timer.
231 ACE_Asynch_Result_Impl
*asynch_timer
=
232 this->proactor_
->create_asynch_timer (handler
->proxy (),
239 if (asynch_timer
== 0)
240 ACELIB_ERROR_RETURN ((LM_ERROR
,
241 ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
242 ACE_TEXT ("ACE_Proactor_Handle_Timeout_Upcall::timeout:")
243 ACE_TEXT ("create_asynch_timer failed")),
246 #if defined (ACE_HAS_CPP11)
247 std::unique_ptr
<ACE_Asynch_Result_Impl
> safe_asynch_timer (asynch_timer
);
249 auto_ptr
<ACE_Asynch_Result_Impl
> safe_asynch_timer (asynch_timer
);
250 #endif /* ACE_HAS_CPP11 */
252 // Post a completion.
253 if (-1 == safe_asynch_timer
->post_completion
254 (this->proactor_
->implementation ()))
255 ACELIB_ERROR_RETURN ((LM_ERROR
,
256 ACE_TEXT ("Failure in dealing with timers: ")
257 ACE_TEXT ("PostQueuedCompletionStatus failed\n")),
260 // The completion has been posted. The proactor is now responsible
261 // for managing the asynch_timer memory.
262 (void) safe_asynch_timer
.release ();
268 ACE_Proactor_Handle_Timeout_Upcall::cancel_type (ACE_Proactor_Timer_Queue
&,
278 ACE_Proactor_Handle_Timeout_Upcall::cancel_timer (ACE_Proactor_Timer_Queue
&,
288 ACE_Proactor_Handle_Timeout_Upcall::deletion (ACE_Proactor_Timer_Queue
&,
297 ACE_Proactor_Handle_Timeout_Upcall::proactor (ACE_Proactor
&proactor
)
299 if (this->proactor_
== 0)
301 this->proactor_
= &proactor
;
305 ACELIB_ERROR_RETURN ((LM_ERROR
,
306 ACE_TEXT ("ACE_Proactor_Handle_Timeout_Upcall is only suppose")
307 ACE_TEXT (" to be used with ONE (and only one) Proactor\n")),
311 // *********************************************************************
313 ACE_Proactor::ACE_Proactor (ACE_Proactor_Impl
*implementation
,
314 bool delete_implementation
,
315 ACE_Proactor_Timer_Queue
*tq
)
316 : implementation_ (0),
317 delete_implementation_ (delete_implementation
),
320 delete_timer_queue_ (0),
322 event_loop_thread_count_ (0)
324 this->implementation (implementation
);
326 if (this->implementation () == 0)
328 #if defined (ACE_HAS_AIO_CALLS)
330 # if defined (ACE_POSIX_AIOCB_PROACTOR)
331 ACE_NEW (implementation
, ACE_POSIX_AIOCB_Proactor
);
332 # elif defined (ACE_POSIX_SIG_PROACTOR)
333 ACE_NEW (implementation
, ACE_POSIX_SIG_Proactor
);
334 # else /* Default order: CB, SIG, AIOCB */
335 # if !defined(ACE_HAS_BROKEN_SIGEVENT_STRUCT)
336 ACE_NEW (implementation
, ACE_POSIX_CB_Proactor
);
338 # if defined(ACE_HAS_POSIX_REALTIME_SIGNALS)
339 ACE_NEW (implementation
, ACE_POSIX_SIG_Proactor
);
341 ACE_NEW (implementation
, ACE_POSIX_AIOCB_Proactor
);
342 # endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */
343 # endif /* !ACE_HAS_BROKEN_SIGEVENT_STRUCT */
344 # endif /* ACE_POSIX_AIOCB_PROACTOR */
345 #elif (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
347 ACE_NEW (implementation
,
349 #endif /* ACE_HAS_AIO_CALLS */
350 this->implementation (implementation
);
351 this->delete_implementation_
= true;
354 // Set the timer queue.
355 this->timer_queue (tq
);
357 // Create the timer handler
358 ACE_NEW (this->timer_handler_
,
359 ACE_Proactor_Timer_Handler (*this));
361 // Activate <timer_handler>.
362 if (this->timer_handler_
->activate () == -1)
363 ACELIB_ERROR ((LM_ERROR
,
364 ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
365 ACE_TEXT ("Task::activate:could not create thread\n")));
368 ACE_Proactor::~ACE_Proactor (void)
374 ACE_Proactor::instance (size_t /* threads */)
376 ACE_TRACE ("ACE_Proactor::instance");
378 if (ACE_Proactor::proactor_
== 0)
380 // Perform Double-Checked Locking Optimization.
381 ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex
, ace_mon
,
382 *ACE_Static_Object_Lock::instance (),
385 if (ACE_Proactor::proactor_
== 0)
387 ACE_NEW_RETURN (ACE_Proactor::proactor_
,
391 ACE_Proactor::delete_proactor_
= true;
392 ACE_REGISTER_FRAMEWORK_COMPONENT(ACE_Proactor
, ACE_Proactor::proactor_
);
395 return ACE_Proactor::proactor_
;
399 ACE_Proactor::instance (ACE_Proactor
* r
, bool delete_proactor
)
401 ACE_TRACE ("ACE_Proactor::instance");
403 ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex
, ace_mon
,
404 *ACE_Static_Object_Lock::instance (), 0));
406 ACE_Proactor
*t
= ACE_Proactor::proactor_
;
408 ACE_Proactor::delete_proactor_
= delete_proactor
;
409 ACE_Proactor::proactor_
= r
;
410 ACE_REGISTER_FRAMEWORK_COMPONENT(ACE_Proactor
, ACE_Proactor::proactor_
);
416 ACE_Proactor::close_singleton (void)
418 ACE_TRACE ("ACE_Proactor::close_singleton");
420 ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex
, ace_mon
,
421 *ACE_Static_Object_Lock::instance ()));
423 if (ACE_Proactor::delete_proactor_
)
425 delete ACE_Proactor::proactor_
;
426 ACE_Proactor::proactor_
= 0;
427 ACE_Proactor::delete_proactor_
= false;
432 ACE_Proactor::dll_name (void)
434 return ACE_TEXT ("ACE");
438 ACE_Proactor::name (void)
440 return ACE_TEXT ("ACE_Proactor");
444 ACE_Proactor::check_reconfiguration (ACE_Proactor
*)
446 #if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_SVCCONF)
447 if (ACE_Service_Config::reconfig_occurred ())
449 ACE_Service_Config::reconfigure ();
452 #endif /* ! ACE_HAS_WINCE || ! ACE_LACKS_ACE_SVCCONF */
457 ACE_Proactor::proactor_run_event_loop (PROACTOR_EVENT_HOOK eh
)
459 ACE_TRACE ("ACE_Proactor::proactor_run_event_loop");
463 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
465 // Early check. It is ok to do this without lock, since we care just
466 // whether it is zero or non-zero.
467 if (this->end_event_loop_
!= 0)
470 // First time you are in. Increment the thread count.
471 this->event_loop_thread_count_
++;
474 // Run the event loop.
477 // Check the end loop flag. It is ok to do this without lock,
478 // since we care just whether it is zero or non-zero.
479 if (this->end_event_loop_
!= 0)
482 // <end_event_loop> is not set. Ready to do <handle_events>.
483 result
= this->handle_events ();
485 if (eh
!= 0 && (*eh
) (this))
492 // Leaving the event loop. Decrement the thread count.
495 // Obtain the lock in the MT environments.
496 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
498 // Decrement the thread count.
499 this->event_loop_thread_count_
--;
501 if (this->event_loop_thread_count_
> 0
502 && this->end_event_loop_
!= 0)
503 this->proactor_post_wakeup_completions (1);
509 // Handle events for -tv- time. handle_events updates -tv- to reflect
510 // time elapsed, so do not return until -tv- == 0, or an error occurs.
512 ACE_Proactor::proactor_run_event_loop (ACE_Time_Value
&tv
,
513 PROACTOR_EVENT_HOOK eh
)
515 ACE_TRACE ("ACE_Proactor::proactor_run_event_loop");
519 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
521 // Early check. It is ok to do this without lock, since we care just
522 // whether it is zero or non-zero.
523 if (this->end_event_loop_
!= 0
524 || tv
== ACE_Time_Value::zero
)
527 // First time you are in. Increment the thread count.
528 this->event_loop_thread_count_
++;
531 // Run the event loop.
534 // Check the end loop flag. It is ok to do this without lock,
535 // since we care just whether it is zero or non-zero.
536 if (this->end_event_loop_
!= 0)
539 // <end_event_loop> is not set. Ready to do <handle_events>.
540 result
= this->handle_events (tv
);
542 if (eh
!= 0 && (*eh
) (this))
545 if (result
== -1 || result
== 0)
549 // Leaving the event loop. Decrement the thread count.
552 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
554 // Decrement the thread count.
555 this->event_loop_thread_count_
--;
557 if (this->event_loop_thread_count_
> 0
558 && this->end_event_loop_
!= 0)
559 this->proactor_post_wakeup_completions (1);
566 ACE_Proactor::proactor_reset_event_loop(void)
568 ACE_TRACE ("ACE_Proactor::proactor_reset_event_loop");
570 // Obtain the lock in the MT environments.
571 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
573 this->end_event_loop_
= 0;
578 ACE_Proactor::proactor_end_event_loop (void)
580 ACE_TRACE ("ACE_Proactor::proactor_end_event_loop");
585 // Obtain the lock, set the end flag and post the wakeup
587 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
590 this->end_event_loop_
= 1;
592 // Number of completions to post.
593 how_many
= this->event_loop_thread_count_
;
598 // Post completions to all the threads so that they will all wake
600 return this->proactor_post_wakeup_completions (how_many
);
604 ACE_Proactor::proactor_event_loop_done (void)
606 ACE_TRACE ("ACE_Proactor::proactor_event_loop_done");
608 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
610 return this->end_event_loop_
!= 0 ? 1 : 0 ;
614 ACE_Proactor::close (void)
616 // Close the implementation.
617 if (this->implementation ()->close () == -1)
618 ACELIB_ERROR ((LM_ERROR
,
619 ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
620 ACE_TEXT ("ACE_Proactor::close: implementation close")));
622 // Delete the implementation.
623 if (this->delete_implementation_
)
625 delete this->implementation ();
626 this->implementation_
= 0;
629 // Delete the timer handler.
630 if (this->timer_handler_
)
632 delete this->timer_handler_
;
633 this->timer_handler_
= 0;
636 // Delete the timer queue.
637 if (this->delete_timer_queue_
)
639 delete this->timer_queue_
;
640 this->timer_queue_
= 0;
641 this->delete_timer_queue_
= 0;
643 else if (this->timer_queue_
)
645 this->timer_queue_
->close ();
646 this->timer_queue_
= 0;
653 ACE_Proactor::register_handle (ACE_HANDLE handle
,
654 const void *completion_key
)
656 return this->implementation ()->register_handle (handle
,
661 ACE_Proactor::schedule_timer (ACE_Handler
&handler
,
663 const ACE_Time_Value
&time
)
665 return this->schedule_timer (handler
,
668 ACE_Time_Value::zero
);
672 ACE_Proactor::schedule_repeating_timer (ACE_Handler
&handler
,
674 const ACE_Time_Value
&interval
)
676 return this->schedule_timer (handler
,
683 ACE_Proactor::schedule_timer (ACE_Handler
&handler
,
685 const ACE_Time_Value
&time
,
686 const ACE_Time_Value
&interval
)
689 ACE_Time_Value absolute_time
=
690 this->timer_queue_
->gettimeofday () + time
;
691 long result
= this->timer_queue_
->schedule (&handler
,
697 // Signal the timer thread to make sure that new events are
698 // dispatched and the sleep time is updated.
699 (void) this->timer_handler_
->signal ();
706 ACE_Proactor::cancel_timer (long timer_id
,
708 int dont_call_handle_close
)
710 // No need to singal timer event here. Even if the cancel timer was
711 // the earliest, we will have an extra wakeup.
712 return this->timer_queue_
->cancel (timer_id
,
714 dont_call_handle_close
);
718 ACE_Proactor::cancel_timer (ACE_Handler
&handler
,
719 int dont_call_handle_close
)
721 // No need to signal timer event here. Even if the cancel timer was
722 // the earliest, we will have an extra wakeup.
723 return this->timer_queue_
->cancel (&handler
,
724 dont_call_handle_close
);
728 ACE_Proactor::handle_events (ACE_Time_Value
&wait_time
)
730 return implementation ()->handle_events (wait_time
);
734 ACE_Proactor::handle_events (void)
736 return this->implementation ()->handle_events ();
740 ACE_Proactor::wake_up_dispatch_threads (void)
746 ACE_Proactor::close_dispatch_threads (int)
752 ACE_Proactor::number_of_threads (void) const
754 return this->implementation ()->number_of_threads ();
758 ACE_Proactor::number_of_threads (size_t threads
)
760 this->implementation ()->number_of_threads (threads
);
763 ACE_Proactor_Timer_Queue
*
764 ACE_Proactor::timer_queue (void) const
766 return this->timer_queue_
;
770 ACE_Proactor::timer_queue (ACE_Proactor_Timer_Queue
*tq
)
772 // Cleanup old timer queue.
773 if (this->delete_timer_queue_
)
775 delete this->timer_queue_
;
776 this->delete_timer_queue_
= 0;
778 else if (this->timer_queue_
)
780 this->timer_queue_
->close ();
786 ACE_NEW (this->timer_queue_
,
788 this->delete_timer_queue_
= 1;
792 this->timer_queue_
= tq
;
793 this->delete_timer_queue_
= 0;
796 // Set the proactor in the timer queue's functor
797 typedef ACE_Timer_Queue_Upcall_Base
<ACE_Handler
*,ACE_Proactor_Handle_Timeout_Upcall
> TQ_Base
;
799 TQ_Base
* tqb
= dynamic_cast<TQ_Base
*> (this->timer_queue_
);
803 tqb
->upcall_functor ().proactor (*this);
808 ACE_Proactor::get_handle (void) const
810 return this->implementation ()->get_handle ();
814 ACE_Proactor::implementation (void) const
816 return this->implementation_
;
820 ACE_Asynch_Read_Stream_Impl
*
821 ACE_Proactor::create_asynch_read_stream (void)
823 return this->implementation ()->create_asynch_read_stream ();
826 ACE_Asynch_Write_Stream_Impl
*
827 ACE_Proactor::create_asynch_write_stream (void)
829 return this->implementation ()->create_asynch_write_stream ();
832 ACE_Asynch_Read_Dgram_Impl
*
833 ACE_Proactor::create_asynch_read_dgram (void)
835 return this->implementation ()->create_asynch_read_dgram ();
838 ACE_Asynch_Write_Dgram_Impl
*
839 ACE_Proactor::create_asynch_write_dgram (void)
841 return this->implementation ()->create_asynch_write_dgram ();
844 ACE_Asynch_Read_File_Impl
*
845 ACE_Proactor::create_asynch_read_file (void)
847 return this->implementation ()->create_asynch_read_file ();
850 ACE_Asynch_Write_File_Impl
*
851 ACE_Proactor::create_asynch_write_file (void)
853 return this->implementation ()->create_asynch_write_file ();
856 ACE_Asynch_Accept_Impl
*
857 ACE_Proactor::create_asynch_accept (void)
859 return this->implementation ()->create_asynch_accept ();
862 ACE_Asynch_Connect_Impl
*
863 ACE_Proactor::create_asynch_connect (void)
865 return this->implementation ()->create_asynch_connect ();
868 ACE_Asynch_Transmit_File_Impl
*
869 ACE_Proactor::create_asynch_transmit_file (void)
871 return this->implementation ()->create_asynch_transmit_file ();
874 ACE_Asynch_Read_Stream_Result_Impl
*
875 ACE_Proactor::create_asynch_read_stream_result
876 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
878 ACE_Message_Block
&message_block
,
879 u_long bytes_to_read
,
885 return this->implementation ()->create_asynch_read_stream_result
897 ACE_Asynch_Write_Stream_Result_Impl
*
898 ACE_Proactor::create_asynch_write_stream_result
899 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
901 ACE_Message_Block
&message_block
,
902 u_long bytes_to_write
,
908 return this->implementation ()->create_asynch_write_stream_result
919 ACE_Asynch_Read_File_Result_Impl
*
920 ACE_Proactor::create_asynch_read_file_result
921 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
923 ACE_Message_Block
&message_block
,
924 u_long bytes_to_read
,
932 return this->implementation ()->create_asynch_read_file_result
945 ACE_Asynch_Write_File_Result_Impl
*
946 ACE_Proactor::create_asynch_write_file_result
947 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
949 ACE_Message_Block
&message_block
,
950 u_long bytes_to_write
,
958 return this->implementation ()->create_asynch_write_file_result
971 ACE_Asynch_Read_Dgram_Result_Impl
*
972 ACE_Proactor::create_asynch_read_dgram_result
973 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
975 ACE_Message_Block
*message_block
,
976 size_t bytes_to_read
,
984 return this->implementation()->create_asynch_read_dgram_result
997 ACE_Asynch_Write_Dgram_Result_Impl
*
998 ACE_Proactor::create_asynch_write_dgram_result
999 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1001 ACE_Message_Block
*message_block
,
1002 size_t bytes_to_write
,
1009 return this->implementation()->create_asynch_write_dgram_result
1021 ACE_Asynch_Accept_Result_Impl
*
1022 ACE_Proactor::create_asynch_accept_result
1023 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1024 ACE_HANDLE listen_handle
,
1025 ACE_HANDLE accept_handle
,
1026 ACE_Message_Block
&message_block
,
1027 u_long bytes_to_read
,
1033 return this->implementation ()->create_asynch_accept_result
1045 ACE_Asynch_Connect_Result_Impl
*
1046 ACE_Proactor::create_asynch_connect_result
1047 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1048 ACE_HANDLE connect_handle
,
1054 return this->implementation ()->create_asynch_connect_result
1063 ACE_Asynch_Transmit_File_Result_Impl
*
1064 ACE_Proactor::create_asynch_transmit_file_result
1065 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1068 ACE_Asynch_Transmit_File::Header_And_Trailer
*header_and_trailer
,
1069 u_long bytes_to_write
,
1072 u_long bytes_per_send
,
1079 return this->implementation ()->create_asynch_transmit_file_result
1095 ACE_Asynch_Result_Impl
*
1096 ACE_Proactor::create_asynch_timer
1097 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1099 const ACE_Time_Value
&tv
,
1104 return this->implementation ()->create_asynch_timer
1114 ACE_Proactor::proactor_post_wakeup_completions (int how_many
)
1116 return this->implementation ()->post_wakeup_completions (how_many
);
1120 ACE_Proactor::implementation (ACE_Proactor_Impl
*implementation
)
1122 this->implementation_
= implementation
;
1125 ACE_END_VERSIONED_NAMESPACE_DECL
1127 #else /* !ACE_WIN32 || !ACE_HAS_AIO_CALLS */
1129 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
1132 ACE_Proactor::instance (size_t /* threads */)
1138 ACE_Proactor::instance (ACE_Proactor
*)
1144 ACE_Proactor::close_singleton (void)
1149 ACE_Proactor::run_event_loop (void)
1156 ACE_Proactor::run_event_loop (ACE_Time_Value
&)
1163 ACE_Proactor::end_event_loop (void)
1170 ACE_Proactor::event_loop_done (void)
1172 return sig_atomic_t (1);
1175 ACE_END_VERSIONED_NAMESPACE_DECL
1177 #endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */