summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ace/Asynch_IO.cpp387
-rw-r--r--ace/Asynch_IO.h198
-rw-r--r--ace/Asynch_IO.i2
3 files changed, 292 insertions, 295 deletions
diff --git a/ace/Asynch_IO.cpp b/ace/Asynch_IO.cpp
index 93077326f1d..f1059071ac9 100644
--- a/ace/Asynch_IO.cpp
+++ b/ace/Asynch_IO.cpp
@@ -1,5 +1,4 @@
-// Asynch_IO.cpp
-// $Id: Asynch_IO,v
+// $Id$
#define ACE_BUILD_DLL
#include "ace/Asynch_IO.h"
@@ -18,10 +17,10 @@
#endif /* __ACE_INLINE__ */
ACE_Asynch_Result::ACE_Asynch_Result (ACE_Handler &handler,
- const void* act,
- ACE_HANDLE event,
- u_long offset,
- u_long offset_high)
+ const void* act,
+ ACE_HANDLE event,
+ u_long offset,
+ u_long offset_high)
: handler_ (handler),
act_ (act),
bytes_transferred_ (0),
@@ -97,9 +96,9 @@ ACE_Asynch_Operation::ACE_Asynch_Operation (void)
int
ACE_Asynch_Operation::open (ACE_Handler &handler,
- ACE_HANDLE handle,
- const void *completion_key,
- ACE_Proactor *proactor)
+ ACE_HANDLE handle,
+ const void *completion_key,
+ ACE_Proactor *proactor)
{
this->proactor_ = proactor;
this->handler_ = &handler;
@@ -121,7 +120,7 @@ ACE_Asynch_Operation::open (ACE_Handler &handler,
// <handler->proactor> is zero
this->proactor_ = this->handler_->proactor ();
if (this->proactor_ == 0)
- this->proactor_ = ACE_Proactor::instance();
+ this->proactor_ = ACE_Proactor::instance();
}
#if !defined (ACE_HAS_AIO_CALLS)
@@ -157,19 +156,19 @@ ACE_Asynch_Read_Stream::ACE_Asynch_Read_Stream (void)
int
ACE_Asynch_Read_Stream::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act)
+ u_long bytes_to_read,
+ const void *act)
{
// Create the Asynch_Result
Result *result = 0;
ACE_NEW_RETURN (result,
- Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_read,
- act,
- this->proactor_->get_handle ()),
- -1);
+ Result (*this->handler_,
+ this->handle_,
+ message_block,
+ bytes_to_read,
+ act,
+ this->proactor_->get_handle ()),
+ -1);
return this->shared_read (result);
}
@@ -222,10 +221,10 @@ ACE_Asynch_Read_Stream::shared_read (ACE_Asynch_Read_Stream::Result *result)
// Initiate the read
int initiate_result = ::ReadFile (result->handle (),
- result->message_block ().wr_ptr (),
- result->bytes_to_read (),
- &bytes_read,
- result);
+ result->message_block ().wr_ptr (),
+ result->bytes_to_read (),
+ &bytes_read,
+ result);
if (initiate_result == 1)
// Immediate success: the OVERLAPPED will still get queued.
return 1;
@@ -254,11 +253,11 @@ ACE_Asynch_Read_Stream::shared_read (ACE_Asynch_Read_Stream::Result *result)
// ************************************************************
ACE_Asynch_Read_Stream::Result::Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event)
+ ACE_HANDLE handle,
+ ACE_Message_Block &message_block,
+ u_long bytes_to_read,
+ const void* act,
+ ACE_HANDLE event)
: ACE_Asynch_Result (handler, act, event),
bytes_to_read_ (bytes_to_read),
message_block_ (message_block),
@@ -286,9 +285,9 @@ ACE_Asynch_Read_Stream::Result::handle (void) const
void
ACE_Asynch_Read_Stream::Result::complete(u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
+ int success,
+ const void *completion_key,
+ u_long error)
{
// Copy the data which was returned by GetQueuedCompletionStatus
this->bytes_transferred_ = bytes_transferred;
@@ -311,18 +310,18 @@ ACE_Asynch_Write_Stream::ACE_Asynch_Write_Stream (void)
int
ACE_Asynch_Write_Stream::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act)
+ u_long bytes_to_write,
+ const void *act)
{
Result *result = 0;
ACE_NEW_RETURN (result,
- Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_write,
- act,
- this->proactor_->get_handle ()),
- -1);
+ Result (*this->handler_,
+ this->handle_,
+ message_block,
+ bytes_to_write,
+ act,
+ this->proactor_->get_handle ()),
+ -1);
return this->shared_write (result);
}
@@ -338,10 +337,10 @@ ACE_Asynch_Write_Stream::shared_write (ACE_Asynch_Write_Stream::Result *result)
// Initiate the write
int initiate_result = ::WriteFile (result->handle (),
- result->message_block ().rd_ptr (),
- result->bytes_to_write (),
- &bytes_written,
- result);
+ result->message_block ().rd_ptr (),
+ result->bytes_to_write (),
+ &bytes_written,
+ result);
if (initiate_result == 1)
// Immediate success: the OVERLAPPED will still get queued.
return 1;
@@ -370,11 +369,11 @@ ACE_Asynch_Write_Stream::shared_write (ACE_Asynch_Write_Stream::Result *result)
// ************************************************************
ACE_Asynch_Write_Stream::Result::Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- ACE_HANDLE event)
+ ACE_HANDLE handle,
+ ACE_Message_Block &message_block,
+ u_long bytes_to_write,
+ const void* act,
+ ACE_HANDLE event)
: ACE_Asynch_Result (handler, act, event),
bytes_to_write_ (bytes_to_write),
message_block_ (message_block),
@@ -402,9 +401,9 @@ ACE_Asynch_Write_Stream::Result::handle (void) const
void
ACE_Asynch_Write_Stream::Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
+ int success,
+ const void *completion_key,
+ u_long error)
{
// Copy the data which was returned by GetQueuedCompletionStatus
this->bytes_transferred_ = bytes_transferred;
@@ -423,22 +422,22 @@ ACE_Asynch_Write_Stream::Result::complete (u_long bytes_transferred,
int
ACE_Asynch_Read_File::read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- u_long offset,
- u_long offset_high,
- const void *act)
+ u_long bytes_to_read,
+ u_long offset,
+ u_long offset_high,
+ const void *act)
{
Result *result = 0;
ACE_NEW_RETURN (result,
- Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_read,
- act,
- offset,
- offset_high,
- this->proactor_->get_handle ()),
- -1);
+ Result (*this->handler_,
+ this->handle_,
+ message_block,
+ bytes_to_read,
+ act,
+ offset,
+ offset_high,
+ this->proactor_->get_handle ()),
+ -1);
return this->shared_read (result);
}
@@ -446,13 +445,13 @@ ACE_Asynch_Read_File::read (ACE_Message_Block &message_block,
// ************************************************************
ACE_Asynch_Read_File::Result::Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event)
+ ACE_HANDLE handle,
+ ACE_Message_Block &message_block,
+ u_long bytes_to_read,
+ const void* act,
+ u_long offset,
+ u_long offset_high,
+ ACE_HANDLE event)
: ACE_Asynch_Read_Stream::Result (handler, handle, message_block, bytes_to_read, act, event)
{
this->Offset = offset;
@@ -461,9 +460,9 @@ ACE_Asynch_Read_File::Result::Result (ACE_Handler &handler,
void
ACE_Asynch_Read_File::Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
+ int success,
+ const void *completion_key,
+ u_long error)
{
ACE_DEBUG ((LM_DEBUG, "ACE_Asynch_Read_File::Result::complete\n"));
@@ -484,22 +483,22 @@ ACE_Asynch_Read_File::Result::complete (u_long bytes_transferred,
int
ACE_Asynch_Write_File::write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- const void *act)
+ u_long bytes_to_write,
+ u_long offset,
+ u_long offset_high,
+ const void *act)
{
Result *result = 0;
ACE_NEW_RETURN (result,
- Result (*this->handler_,
- this->handle_,
- message_block,
- bytes_to_write,
- act,
- offset,
- offset_high,
- this->proactor_->get_handle ()),
- -1);
+ Result (*this->handler_,
+ this->handle_,
+ message_block,
+ bytes_to_write,
+ act,
+ offset,
+ offset_high,
+ this->proactor_->get_handle ()),
+ -1);
return this->shared_write (result);
}
@@ -507,13 +506,13 @@ ACE_Asynch_Write_File::write (ACE_Message_Block &message_block,
// ************************************************************
ACE_Asynch_Write_File::Result::Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event)
+ ACE_HANDLE handle,
+ ACE_Message_Block &message_block,
+ u_long bytes_to_write,
+ const void* act,
+ u_long offset,
+ u_long offset_high,
+ ACE_HANDLE event)
: ACE_Asynch_Write_Stream::Result (handler, handle, message_block, bytes_to_write, act, event)
{
this->Offset = offset;
@@ -522,9 +521,9 @@ ACE_Asynch_Write_File::Result::Result (ACE_Handler &handler,
void
ACE_Asynch_Write_File::Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
+ int success,
+ const void *completion_key,
+ u_long error)
{
// Copy the data which was returned by GetQueuedCompletionStatus
this->bytes_transferred_ = bytes_transferred;
@@ -547,9 +546,9 @@ ACE_Asynch_Accept::ACE_Asynch_Accept (void)
int
ACE_Asynch_Accept::accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- ACE_HANDLE accept_handle,
- const void *act)
+ u_long bytes_to_read,
+ ACE_HANDLE accept_handle,
+ const void *act)
{
#if defined (ACE_HAS_AIO_CALLS)
ACE_UNUSED_ARG (message_block);
@@ -573,37 +572,37 @@ ACE_Asynch_Accept::accept (ACE_Message_Block &message_block,
if (accept_handle == ACE_INVALID_HANDLE)
{
accept_handle = ACE_OS::socket (PF_INET,
- SOCK_STREAM,
- 0);
+ SOCK_STREAM,
+ 0);
if (accept_handle == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_OS::socket")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_OS::socket")), -1);
else
- // Remember to close the socket down if failures occur.
- close_accept_handle = 1;
+ // Remember to close the socket down if failures occur.
+ close_accept_handle = 1;
}
Result *result = 0;
ACE_NEW_RETURN (result,
- Result (*this->handler_,
- this->handle_,
- accept_handle,
- message_block,
- bytes_to_read,
- act,
- this->proactor_->get_handle ()),
- -1);
+ Result (*this->handler_,
+ this->handle_,
+ accept_handle,
+ message_block,
+ bytes_to_read,
+ act,
+ this->proactor_->get_handle ()),
+ -1);
u_long bytes_read;
// Initiate the accept
int initiate_result = ::AcceptEx ((SOCKET) result->listen_handle (),
- (SOCKET) result->accept_handle (),
- result->message_block ().wr_ptr (),
- result->bytes_to_read (),
- address_size,
- address_size,
- &bytes_read,
- result);
+ (SOCKET) result->accept_handle (),
+ result->message_block ().wr_ptr (),
+ result->bytes_to_read (),
+ address_size,
+ address_size,
+ &bytes_read,
+ result);
if (initiate_result == 1)
// Immediate success: the OVERLAPPED will still get queued.
return 1;
@@ -622,8 +621,8 @@ ACE_Asynch_Accept::accept (ACE_Message_Block &message_block,
// queued.
if (close_accept_handle == 1)
- // Close the newly created socket
- ACE_OS::closesocket (accept_handle);
+ // Close the newly created socket
+ ACE_OS::closesocket (accept_handle);
// Cleanup dynamically allocated Asynch_Result
delete result;
@@ -663,12 +662,12 @@ ACE_Asynch_Accept::Result::accept_handle (void) const
}
ACE_Asynch_Accept::Result::Result (ACE_Handler &handler,
- ACE_HANDLE listen_handle,
- ACE_HANDLE accept_handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event)
+ ACE_HANDLE listen_handle,
+ ACE_HANDLE accept_handle,
+ ACE_Message_Block &message_block,
+ u_long bytes_to_read,
+ const void* act,
+ ACE_HANDLE event)
: ACE_Asynch_Result (handler, act, event),
bytes_to_read_ (bytes_to_read),
message_block_ (message_block),
@@ -679,9 +678,9 @@ ACE_Asynch_Accept::Result::Result (ACE_Handler &handler,
void
ACE_Asynch_Accept::Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
+ int success,
+ const void *completion_key,
+ u_long error)
{
// Copy the data which was returned by GetQueuedCompletionStatus
this->bytes_transferred_ = bytes_transferred;
@@ -704,13 +703,13 @@ ACE_Asynch_Transmit_File::ACE_Asynch_Transmit_File (void)
int
ACE_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
- Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act)
+ Header_And_Trailer *header_and_trailer,
+ u_long bytes_to_write,
+ u_long offset,
+ u_long offset_high,
+ u_long bytes_per_send,
+ u_long flags,
+ const void *act)
{
#if defined (ACE_HAS_AIO_CALLS)
ACE_UNUSED_ARG (file);
@@ -727,18 +726,18 @@ ACE_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
#if (defined (ACE_HAS_WINNT4) && (ACE_HAS_WINNT4 != 0)) || (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
Result *result = 0;
ACE_NEW_RETURN (result,
- Result (*this->handler_,
- this->handle_,
- file,
- header_and_trailer,
- bytes_to_write,
- offset,
- offset_high,
- bytes_per_send,
- flags,
- act,
- this->proactor_->get_handle ()),
- -1);
+ Result (*this->handler_,
+ this->handle_,
+ file,
+ header_and_trailer,
+ bytes_to_write,
+ offset,
+ offset_high,
+ bytes_per_send,
+ flags,
+ act,
+ this->proactor_->get_handle ()),
+ -1);
ACE_LPTRANSMIT_FILE_BUFFERS transmit_buffers = 0;
if (result->header_and_trailer () != 0)
@@ -746,12 +745,12 @@ ACE_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
// Initiate the transmit file
int initiate_result = ::TransmitFile ((SOCKET) result->socket (),
- result->file (),
- result->bytes_to_write (),
- result->bytes_per_send (),
- result,
- transmit_buffers,
- result->flags ());
+ result->file (),
+ result->bytes_to_write (),
+ result->bytes_per_send (),
+ result,
+ transmit_buffers,
+ result->flags ());
if (initiate_result == 1)
// Immediate success: the OVERLAPPED will still get queued.
return 1;
@@ -819,16 +818,16 @@ ACE_Asynch_Transmit_File::Result::flags (void) const
}
ACE_Asynch_Transmit_File::Result::Result (ACE_Handler &handler,
- ACE_HANDLE socket,
- ACE_HANDLE file,
- Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- ACE_HANDLE event)
+ ACE_HANDLE socket,
+ ACE_HANDLE file,
+ Header_And_Trailer *header_and_trailer,
+ u_long bytes_to_write,
+ u_long offset,
+ u_long offset_high,
+ u_long bytes_per_send,
+ u_long flags,
+ const void *act,
+ ACE_HANDLE event)
: ACE_Asynch_Result (handler, act, event, offset, offset_high),
socket_ (socket),
file_ (file),
@@ -841,9 +840,9 @@ ACE_Asynch_Transmit_File::Result::Result (ACE_Handler &handler,
void
ACE_Asynch_Transmit_File::Result::complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error)
+ int success,
+ const void *completion_key,
+ u_long error)
{
// Copy the data which was returned by GetQueuedCompletionStatus
this->bytes_transferred_ = bytes_transferred;
@@ -874,9 +873,9 @@ ACE_Asynch_Transmit_File::Result::complete (u_long bytes_transferred,
// ************************************************************
ACE_Asynch_Transmit_File::Header_And_Trailer::Header_And_Trailer (ACE_Message_Block *header,
- u_long header_bytes,
- ACE_Message_Block *trailer,
- u_long trailer_bytes)
+ u_long header_bytes,
+ ACE_Message_Block *trailer,
+ u_long trailer_bytes)
: header_ (header),
header_bytes_ (header_bytes),
trailer_ (trailer),
@@ -886,9 +885,9 @@ ACE_Asynch_Transmit_File::Header_And_Trailer::Header_And_Trailer (ACE_Message_Bl
void
ACE_Asynch_Transmit_File::Header_And_Trailer::header_and_trailer (ACE_Message_Block *header,
- u_long header_bytes,
- ACE_Message_Block *trailer,
- u_long trailer_bytes)
+ u_long header_bytes,
+ ACE_Message_Block *trailer,
+ u_long trailer_bytes)
{
this->header (header);
this->header_bytes (header_bytes);
@@ -956,27 +955,27 @@ ACE_Asynch_Transmit_File::Header_And_Trailer::transmit_buffers (void)
// If header is valid, set the fields
if (this->header_ != 0)
- {
- this->transmit_buffers_.Head = this->header_->rd_ptr ();
- this->transmit_buffers_.HeadLength = this->header_bytes_;
- }
+ {
+ this->transmit_buffers_.Head = this->header_->rd_ptr ();
+ this->transmit_buffers_.HeadLength = this->header_bytes_;
+ }
else
- {
- this->transmit_buffers_.Head = 0;
- this->transmit_buffers_.HeadLength = 0;
- }
+ {
+ this->transmit_buffers_.Head = 0;
+ this->transmit_buffers_.HeadLength = 0;
+ }
// If trailer is valid, set the fields
if (this->trailer_ != 0)
- {
- this->transmit_buffers_.Tail = this->trailer_->rd_ptr ();
- this->transmit_buffers_.TailLength = this->trailer_bytes_;
- }
+ {
+ this->transmit_buffers_.Tail = this->trailer_->rd_ptr ();
+ this->transmit_buffers_.TailLength = this->trailer_bytes_;
+ }
else
- {
- this->transmit_buffers_.Tail = 0;
- this->transmit_buffers_.TailLength = 0;
- }
+ {
+ this->transmit_buffers_.Tail = 0;
+ this->transmit_buffers_.TailLength = 0;
+ }
// Return the transmit buffers
return &this->transmit_buffers_;
@@ -1045,7 +1044,7 @@ ACE_Handler::handle_notify (const ACE_Asynch_Notify::Result &result)
void
ACE_Handler::handle_time_out (const ACE_Time_Value &tv,
- const void *act)
+ const void *act)
{
ACE_UNUSED_ARG (tv);
ACE_UNUSED_ARG (act);
@@ -1081,7 +1080,7 @@ ACE_Service_Handler::~ACE_Service_Handler (void)
void
ACE_Service_Handler::addresses (const ACE_INET_Addr &remote_address,
- const ACE_INET_Addr &local_address)
+ const ACE_INET_Addr &local_address)
{
// Default behavior is to print out the addresses.
ASYS_TCHAR local_address_buf[BUFSIZ], remote_address_buf[BUFSIZ];
diff --git a/ace/Asynch_IO.h b/ace/Asynch_IO.h
index a931ef21b69..10ed146be52 100644
--- a/ace/Asynch_IO.h
+++ b/ace/Asynch_IO.h
@@ -1,5 +1,5 @@
/* -*- C++ -*- */
-// $Id: Asynch_IO.h,v
+// $Id$
// ============================================================================
//
@@ -82,10 +82,10 @@ public:
// make sense only when doing file I/O.
ACE_Asynch_Result (ACE_Handler &handler,
- const void* act,
- ACE_HANDLE event,
- u_long offset = 0,
- u_long offset_high = 0);
+ const void* act,
+ ACE_HANDLE event,
+ u_long offset = 0,
+ u_long offset_high = 0);
// Constructor.
virtual ~ACE_Asynch_Result (void);
@@ -93,9 +93,9 @@ public:
protected:
virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error = 0) = 0;
+ int success,
+ const void *completion_key,
+ u_long error = 0) = 0;
// This is the key method. Subclasses will override this method to
// call the correct callback on the handler.
@@ -129,9 +129,9 @@ class ACE_Export ACE_Asynch_Operation
// factor out this code.
public:
int open (ACE_Handler &handler,
- ACE_HANDLE handle = ACE_INVALID_HANDLE,
- const void *completion_key = 0,
- ACE_Proactor *proactor = 0);
+ ACE_HANDLE handle = ACE_INVALID_HANDLE,
+ const void *completion_key = 0,
+ ACE_Proactor *proactor = 0);
// Initializes the factory with information which will be used with
// each asynchronous call. If (<handle> == ACE_INVALID_HANDLE),
// <ACE_Handler::handle> will be called on the <handler> to get the
@@ -176,8 +176,8 @@ public:
// A do nothing constructor.
int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void *act = 0);
+ u_long bytes_to_read,
+ const void *act = 0);
// This starts off an asynchronous read. Upto <bytes_to_read> will
// be read and stored in the <message_block>.
@@ -216,18 +216,18 @@ public:
// These two should really be protected. But sometimes it
// simplifies code to be able to "fake" a result. Use carefully.
Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event);
+ ACE_HANDLE handle,
+ ACE_Message_Block &message_block,
+ u_long bytes_to_read,
+ const void* act,
+ ACE_HANDLE event);
// Constructor is protected since creation is limited to
// ACE_Asynch_Read_Stream factory.
virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error = 0);
+ int success,
+ const void *completion_key,
+ u_long error = 0);
// ACE_Proactor will call this method when the read completes.
protected:
@@ -262,8 +262,8 @@ public:
// A do nothing constructor.
int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void *act = 0);
+ u_long bytes_to_write,
+ const void *act = 0);
// This starts off an asynchronous write. Upto <bytes_to_write>
// will be written from the <message_block>.
@@ -302,18 +302,18 @@ public:
// These two should really be protected. But sometimes it
// simplifies code to be able to "fake" a result. Use carefully.
Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- ACE_HANDLE event);
+ ACE_HANDLE handle,
+ ACE_Message_Block &message_block,
+ u_long bytes_to_write,
+ const void* act,
+ ACE_HANDLE event);
// Constructor is protected since creation is limited to
// ACE_Asynch_Write_Stream factory.
virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error = 0);
+ int success,
+ const void *completion_key,
+ u_long error = 0);
// ACE_Proactor will call this method when the write completes.
protected:
@@ -346,10 +346,10 @@ class ACE_Export ACE_Asynch_Read_File : public ACE_Asynch_Read_Stream
// allows the user to specify an offset for the read.
public:
int read (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- u_long offset = 0,
- u_long offset_high = 0,
- const void *act = 0);
+ u_long bytes_to_read,
+ u_long offset = 0,
+ u_long offset_high = 0,
+ const void *act = 0);
// This starts off an asynchronous read. Upto <bytes_to_read> will
// be read and stored in the <message_block>. The read will start
// at <offset> from the beginning of the file.
@@ -381,20 +381,20 @@ public:
// These two should really be protected. But sometimes it
// simplifies code to be able to "fake" a result. Use carefully.
Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event);
+ ACE_HANDLE handle,
+ ACE_Message_Block &message_block,
+ u_long bytes_to_read,
+ const void* act,
+ u_long offset,
+ u_long offset_high,
+ ACE_HANDLE event);
// Constructor is protected since creation is limited to
// ACE_Asynch_Read_File factory.
virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error = 0);
+ int success,
+ const void *completion_key,
+ u_long error = 0);
// ACE_Proactor will call this method when the read completes.
};
};
@@ -416,10 +416,10 @@ public:
// This class differs slightly from ACE_Asynch_Write_Stream as
// it allows the user to specify an offset for the write.
int write (ACE_Message_Block &message_block,
- u_long bytes_to_write,
- u_long offset = 0,
- u_long offset_high = 0,
- const void *act = 0);
+ u_long bytes_to_write,
+ u_long offset = 0,
+ u_long offset_high = 0,
+ const void *act = 0);
// This starts off an asynchronous write. Upto <bytes_to_write>
// will be write and stored in the <message_block>. The write will
// start at <offset> from the beginning of the file.
@@ -451,20 +451,20 @@ public:
// These two should really be protected. But sometimes it
// simplifies code to be able to "fake" a result. Use carefully.
Result (ACE_Handler &handler,
- ACE_HANDLE handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_write,
- const void* act,
- u_long offset,
- u_long offset_high,
- ACE_HANDLE event);
+ ACE_HANDLE handle,
+ ACE_Message_Block &message_block,
+ u_long bytes_to_write,
+ const void* act,
+ u_long offset,
+ u_long offset_high,
+ ACE_HANDLE event);
// Constructor is protected since creation is limited to
// ACE_Asynch_Write_File factory.
virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error = 0);
+ int success,
+ const void *completion_key,
+ u_long error = 0);
// ACE_Proactor will call this method when the write completes.
};
};
@@ -486,9 +486,9 @@ public:
// A do nothing constructor.
int accept (ACE_Message_Block &message_block,
- u_long bytes_to_read,
- ACE_HANDLE accept_handle = ACE_INVALID_HANDLE,
- const void *act = 0);
+ u_long bytes_to_read,
+ ACE_HANDLE accept_handle = ACE_INVALID_HANDLE,
+ const void *act = 0);
// This starts off an asynchronous accept. The asynchronous accept
// call also allows any initial data to be returned to the
// <handler>. Upto <bytes_to_read> will be read and stored in the
@@ -532,19 +532,19 @@ public:
// These two should really be protected. But sometimes it
// simplifies code to be able to "fake" a result. Use carefully.
Result (ACE_Handler &handler,
- ACE_HANDLE listen_handle,
- ACE_HANDLE accept_handle,
- ACE_Message_Block &message_block,
- u_long bytes_to_read,
- const void* act,
- ACE_HANDLE event);
+ ACE_HANDLE listen_handle,
+ ACE_HANDLE accept_handle,
+ ACE_Message_Block &message_block,
+ u_long bytes_to_read,
+ const void* act,
+ ACE_HANDLE event);
// Constructor is protected since creation is limited to
// ACE_Asynch_Accept factory.
virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error = 0);
+ int success,
+ const void *completion_key,
+ u_long error = 0);
// ACE_Proactor will call this method when the accept completes.
protected:
@@ -589,13 +589,13 @@ public:
// A do nothing constructor.
int transmit_file (ACE_HANDLE file,
- Header_And_Trailer *header_and_trailer = 0,
- u_long bytes_to_write = 0,
- u_long offset = 0,
- u_long offset_high = 0,
- u_long bytes_per_send = 0,
- u_long flags = 0,
- const void *act = 0);
+ Header_And_Trailer *header_and_trailer = 0,
+ u_long bytes_to_write = 0,
+ u_long offset = 0,
+ u_long offset_high = 0,
+ u_long bytes_per_send = 0,
+ u_long flags = 0,
+ const void *act = 0);
// This starts off an asynchronous transmit file. The <file> is a
// handle to an open file. <header_and_trailer> is a pointer to a
// data structure that contains pointers to data to send before and
@@ -646,23 +646,23 @@ public:
// These two should really be protected. But sometimes it
// simplifies code to be able to "fake" a result. Use carefully.
Result (ACE_Handler &handler,
- ACE_HANDLE socket,
- ACE_HANDLE file,
- Header_And_Trailer *header_and_trailer,
- u_long bytes_to_write,
- u_long offset,
- u_long offset_high,
- u_long bytes_per_send,
- u_long flags,
- const void *act,
- ACE_HANDLE event);
+ ACE_HANDLE socket,
+ ACE_HANDLE file,
+ Header_And_Trailer *header_and_trailer,
+ u_long bytes_to_write,
+ u_long offset,
+ u_long offset_high,
+ u_long bytes_per_send,
+ u_long flags,
+ const void *act,
+ ACE_HANDLE event);
// Constructor is protected since creation is limited to
// ACE_Asynch_Transmit_File factory.
virtual void complete (u_long bytes_transferred,
- int success,
- const void *completion_key,
- u_long error = 0);
+ int success,
+ const void *completion_key,
+ u_long error = 0);
// ACE_Proactor will call this method when the write completes.
protected:
@@ -698,15 +698,15 @@ public:
// and provided a consistent use of ACE_Message_Blocks.
public:
Header_And_Trailer (ACE_Message_Block *header = 0,
- u_long header_bytes = 0,
- ACE_Message_Block *trailer = 0,
- u_long trailer_bytes = 0);
+ u_long header_bytes = 0,
+ ACE_Message_Block *trailer = 0,
+ u_long trailer_bytes = 0);
// Constructor
void header_and_trailer (ACE_Message_Block *header = 0,
- u_long header_bytes = 0,
- ACE_Message_Block *trailer = 0,
- u_long trailer_bytes = 0);
+ u_long header_bytes = 0,
+ ACE_Message_Block *trailer = 0,
+ u_long trailer_bytes = 0);
// This method allows all the member to be set in one fell swoop.
ACE_Message_Block *header (void) const;
@@ -788,7 +788,7 @@ public:
// completes.
virtual void handle_time_out (const ACE_Time_Value &tv,
- const void *act = 0);
+ const void *act = 0);
// Called when timer expires. <tv> was the requested time value and
// <act> is the ACT passed when scheduling the timer
@@ -844,7 +844,7 @@ public:
// friend has been figured out.
virtual void addresses (const ACE_INET_Addr &remote_address,
- const ACE_INET_Addr &local_address);
+ const ACE_INET_Addr &local_address);
// Called by ACE_Asynch_Acceptor to pass the addresses of the new
// connections.
};
diff --git a/ace/Asynch_IO.i b/ace/Asynch_IO.i
index a1d45b3ca47..6318deb79a0 100644
--- a/ace/Asynch_IO.i
+++ b/ace/Asynch_IO.i
@@ -1,4 +1,2 @@
/* -*- C++ -*- */
// $Id$
-
-// Asynch_IO.i