diff options
Diffstat (limited to 'ace/ACE.h')
-rw-r--r-- | ace/ACE.h | 144 |
1 files changed, 72 insertions, 72 deletions
diff --git a/ace/ACE.h b/ace/ACE.h index 4f077e8da59..2b089ca2808 100644 --- a/ace/ACE.h +++ b/ace/ACE.h @@ -5,13 +5,13 @@ // // = LIBRARY // ace -// +// // = FILENAME // ACE.h // // = AUTHOR -// Doug Schmidt -// +// Doug Schmidt +// // ============================================================================ // This #include must come first to avoid recursive include problems. @@ -21,7 +21,7 @@ #define ACE_ACE_H #if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once +# pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ // Forward declarations. @@ -71,31 +71,31 @@ public: // E.g., the "0" in SunPro C++ 4.32.0 // = Recv operations that factor out differences between Win32 and UNIX. - static ssize_t recv (ACE_HANDLE handle, - void *buf, - size_t len, + static ssize_t recv (ACE_HANDLE handle, + void *buf, + size_t len, int flags); // Receive up to <len> bytes into <buf> from <handle> (uses the // <ACE_OS::recv> call). - static ssize_t recv (ACE_HANDLE handle, - void *buf, + static ssize_t recv (ACE_HANDLE handle, + void *buf, size_t len); // Receive up to <len> bytes into <buf> from <handle> (uses the // <ACE_OS::read> system call on UNIX and the <ACE_OS::recv> call on // Win32). // = Recv operations that receive exactly n bytes. - static ssize_t recv_n (ACE_HANDLE handle, - void *buf, - size_t len, + static ssize_t recv_n (ACE_HANDLE handle, + void *buf, + size_t len, int flags); // Receive <len> bytes into <buf> from <handle> (uses the // <ACE_OS::recv> call). If <handle> is set to non-blocking mode // this call will poll until all <len> bytes are received. - static ssize_t recv_n (ACE_HANDLE handle, - void *buf, + static ssize_t recv_n (ACE_HANDLE handle, + void *buf, size_t len); // Receive <len> bytes into <buf> from <handle> (uses the // <ACE_OS::read> system call on UNIX and the <ACE_OS::recv> call on @@ -103,9 +103,9 @@ public: // poll until all <len> bytes are received. // = Timed <recv> operations. - static ssize_t recv (ACE_HANDLE handle, - void *buf, - size_t len, + static ssize_t recv (ACE_HANDLE handle, + void *buf, + size_t len, int flags, const ACE_Time_Value *timeout); // Wait up to <timeout> amount of time to receive up to <len> bytes @@ -116,9 +116,9 @@ public: // elapses). If <recv> times out a -1 is returned with <errno == // ETIME>. If it succeeds the number of bytes received is returned. - static ssize_t recv (ACE_HANDLE handle, - void *buf, - size_t len, + static ssize_t recv (ACE_HANDLE handle, + void *buf, + size_t len, const ACE_Time_Value *timeout); // Wait up to <timeout> amount of time to receive up to <len> bytes // into <buf> from <handle> (uses the <ACE_OS::read> call). The @@ -142,7 +142,7 @@ public: static ssize_t recvfrom (ACE_HANDLE handle, char *buf, - int len, + int len, int flags, struct sockaddr *addr, int *addrlen, @@ -156,9 +156,9 @@ public: // == ETIME>. If it succeeds the number of bytes received is // returned. - static ssize_t recv_n (ACE_HANDLE handle, - void *buf, - size_t len, + static ssize_t recv_n (ACE_HANDLE handle, + void *buf, + size_t len, int flags, const ACE_Time_Value *timeout); // Try to recv exactly <len> bytes into <buf> from <handle> (uses @@ -171,9 +171,9 @@ public: // <recv_n> return <len> (i.e., the number of bytes requested to be // read). - static ssize_t recv_n (ACE_HANDLE handle, - void *buf, - size_t len, + static ssize_t recv_n (ACE_HANDLE handle, + void *buf, + size_t len, const ACE_Time_Value *timeout); // Try to recv exactly <len> bytes into <buf> from <handle> (uses // the <ACE_OS::recv> call). The <timeout> indicates how long to @@ -186,31 +186,31 @@ public: // read). // = Send operations that factor out differences between Win32 and UNIX. - static ssize_t send (ACE_HANDLE handle, - const void *buf, - size_t len, + static ssize_t send (ACE_HANDLE handle, + const void *buf, + size_t len, int flags); // Send up to <len> bytes into <buf> from <handle> (uses the // <ACE_OS::send> call). - static ssize_t send (ACE_HANDLE handle, - const void *buf, + static ssize_t send (ACE_HANDLE handle, + const void *buf, size_t len); // Send up to <len> bytes into <buf> from <handle> (uses the // <ACE_OS::write> system call on UNIX and the <ACE_OS::send> call // on Win32). // = Send operations that send exactly n bytes. - static ssize_t send_n (ACE_HANDLE handle, - const void *buf, - size_t len, + static ssize_t send_n (ACE_HANDLE handle, + const void *buf, + size_t len, int flags); // Send <len> bytes from <buf> to <handle> (uses the <ACE_OS::send> // system call). If <handle> is set to non-blocking mode this call // will poll until all <len> bytes are sent. - static ssize_t send_n (ACE_HANDLE handle, - const void *buf, + static ssize_t send_n (ACE_HANDLE handle, + const void *buf, size_t len); // Send <len> bytes from <buf> to <handle> (uses the <ACE_OS::write> // system call on UNIX and the <ACE_OS::recv> call on Win32). If @@ -218,9 +218,9 @@ public: // all <len> bytes are sent. // = Timed <send> operations. - static ssize_t send (ACE_HANDLE handle, - const void *buf, - size_t len, + static ssize_t send (ACE_HANDLE handle, + const void *buf, + size_t len, const ACE_Time_Value *timeout); // Wait up to <timeout> amount of time to send up to <len> bytes // into <buf> from <handle> (uses the <ACE_OS::write> system call on @@ -231,9 +231,9 @@ public: // <send> times out a -1 is returned with <errno == ETIME>. If it // succeeds the number of bytes sent is returned. - static ssize_t send (ACE_HANDLE handle, - const void *buf, - size_t len, + static ssize_t send (ACE_HANDLE handle, + const void *buf, + size_t len, int flags, const ACE_Time_Value *timeout); // Wait up to <timeout> amount of time to send up to <len> bytes @@ -244,8 +244,8 @@ public: // elapses). If <send> times out a -1 is returned with <errno == // ETIME>. If it succeeds the number of bytes sent is returned. - static ssize_t sendmsg (ACE_HANDLE handle, - const struct msghdr *msg, + static ssize_t sendmsg (ACE_HANDLE handle, + const struct msghdr *msg, int flags, const ACE_Time_Value *timeout); // Wait up to <timeout> amount of time to send the <msg> to <handle> @@ -258,7 +258,7 @@ public: static ssize_t sendto (ACE_HANDLE handle, const char *buf, - int len, + int len, int flags, const struct sockaddr *addr, int addrlen, @@ -271,9 +271,9 @@ public: // elapses). If <sendto> times out a -1 is returned with <errno == // ETIME>. If it succeeds the number of bytes sent is returned. - static ssize_t send_n (ACE_HANDLE handle, - const void *buf, - size_t len, + static ssize_t send_n (ACE_HANDLE handle, + const void *buf, + size_t len, int flags, const ACE_Time_Value *timeout); // Try to send exactly <len> bytes into <buf> from <handle> (uses @@ -286,9 +286,9 @@ public: // <send_n> return <len> (i.e., the number of bytes requested to be // sent). - static ssize_t send_n (ACE_HANDLE handle, - const void *buf, - size_t len, + static ssize_t send_n (ACE_HANDLE handle, + const void *buf, + size_t len, const ACE_Time_Value *timeout); // Try to send exactly <len> bytes into <buf> from <handle> (uses // the <ACE_OS::send> call). The <timeout> indicates how long to @@ -302,7 +302,7 @@ public: // = Timed Scatter-read and gather-write functions. - static ssize_t writev (ACE_HANDLE handle, + static ssize_t writev (ACE_HANDLE handle, const iovec *iov, int iovcnt, const ACE_Time_Value *timeout); @@ -335,8 +335,8 @@ public: // These encapsulate differences between UNIX and Win32 and also // send and recv exactly n bytes. - static ssize_t read_n (ACE_HANDLE handle, - void *buf, + static ssize_t read_n (ACE_HANDLE handle, + void *buf, size_t len); // Receive <len> bytes into <buf> from <handle> (uses the // <ACE_OS::read> call, which uses the <read> system call on UNIX @@ -344,8 +344,8 @@ public: // non-blocking mode this call will poll until all <len> bytes are // received. - static ssize_t write_n (ACE_HANDLE handle, - const void *buf, + static ssize_t write_n (ACE_HANDLE handle, + const void *buf, size_t len); // Send <len> bytes from <buf> to <handle> (uses the <ACE_OS::write> // calls, which is uses the <write> system call on UNIX and the @@ -369,7 +369,7 @@ public: // socket internally (and free it). Returns -1 on failure and 0 on // success. - static int get_ip_interfaces (size_t &count, + static int get_ip_interfaces (size_t &count, ACE_INET_Addr *&addr_array); // Return count and array of all configured IP interfaces on this // host, rc = 0 on success (count == number of interfaces else -1). @@ -386,13 +386,13 @@ public: // made. Caller must <close> the handle. static int handle_timed_accept (ACE_HANDLE listener, - ACE_Time_Value *timeout, + ACE_Time_Value *timeout, int restart); // Wait up to <timeout> amount of time to passively establish a // connection. This method doesn't perform the <accept>, it just // does the timed wait... - static ACE_HANDLE handle_timed_complete (ACE_HANDLE listener, + static ACE_HANDLE handle_timed_complete (ACE_HANDLE listener, ACE_Time_Value *timeout, int is_tli = 0); // Wait up to <timeout> amount of time to complete an actively @@ -404,18 +404,18 @@ public: static ACE_HANDLE handle_timed_open (ACE_Time_Value *timeout, LPCTSTR name, - int flags, + int flags, int perms); // Wait up to <timeout> amount of time to actively open a device. // This method doesn't perform the <connect>, it just does the timed // wait... // = Set/get/clear various flags related to I/O HANDLE. - static int set_flags (ACE_HANDLE handle, + static int set_flags (ACE_HANDLE handle, int flags); // Set flags associated with <handle>. - static int clr_flags (ACE_HANDLE handle, + static int clr_flags (ACE_HANDLE handle, int flags); // Clear flags associated with <handle>. @@ -454,7 +454,7 @@ public: // new> rather than <malloc>. # if defined (ACE_WIN32) - static wchar_t *strnew (const wchar_t *s); + static wchar_t *strnew (const wchar_t *s); // This method is just like <strdup>, except that it uses <operator // new> rather than <malloc>. #endif /* ACE_WIN32 */ @@ -486,7 +486,7 @@ public: // "<pathname>.exe". Always returns <pathname> on UNIX. static const char *basename (const char *pathname, - char delim); + char delim); // Returns the "basename" of a <pathname>. #if defined (ACE_HAS_UNICODE) @@ -503,7 +503,7 @@ public: static const wchar_t *execname (const wchar_t *pathname); static const wchar_t *basename (const wchar_t *pathname, - wchar_t delim); + wchar_t delim); // Returns the "basename" of a <pathname>. #endif /* ACE_HAS_UNICODE */ @@ -522,8 +522,8 @@ public: // = Methods for searching and opening shared libraries. - static int ldfind (const ASYS_TCHAR *filename, - ASYS_TCHAR *pathname, + static int ldfind (const ASYS_TCHAR *filename, + ASYS_TCHAR *pathname, size_t maxlen); // Finds the file <filename> either using an absolute path or using // a relative path in conjunction with ACE_LD_SEARCH_PATH (e.g., @@ -534,17 +534,17 @@ public: // Win32) if the <filename> doesn't match directly. static FILE *ldopen (const ASYS_TCHAR *filename, - const ASYS_TCHAR *type); + const ASYS_TCHAR *type); // Uses <ldopen> to locate and open the appropriate <filename> and // returns a pointer to the file, else it returns a NULL // pointer. <type> specifies how the file should be open. static ACE_HANDLE open_temp_file (const char *name, - int mode, + int mode, int perm = 0); // Opening the temp file. File is automagically unlinked when it is // closed. This is useful for have temp files. - + // = Shield us from Win32's inability to select on STDIN. // = Miscelleous functions. @@ -605,7 +605,7 @@ public: // may not have a chance to cleanup before it shuts down. static void unique_name (const void *object, - LPTSTR name, + LPTSTR name, size_t length); // This method uses process id and object pointer to come up with a // machine wide unique name. The process ID will provide uniqueness |