ACE 8.0.0
|
The namespace containing the ACE framework itself. More...
Namespaces | |
namespace | Monitor_Control |
Classes | |
struct | If_Then_Else |
Compile-time selection of type based on a boolean value. More... | |
struct | If_Then_Else< false, Ta, Tb > |
struct | If_Then_Else< true, Ta, Tb > |
class | Value_Ptr |
Smart pointer implementation designed for use as a class member. More... | |
struct | VP_traits |
Value_Ptr traits template structure. More... | |
Functions | |
u_int | major_version () |
e.g., the "6" in ACE 6.3.4 | |
u_int | minor_version () |
e.g., the "3" in ACE 6.3.4 | |
u_int | micro_version () |
u_int | beta_version () |
const ACE_TCHAR * | compiler_name () |
E.g., the "SunPro C++" in SunPro C++ 4.32.0. | |
u_int | compiler_major_version () |
E.g., the "4" in SunPro C++ 4.32.0. | |
u_int | compiler_minor_version () |
E.g., the "32" in SunPro C++ 4.32.0. | |
u_int | compiler_beta_version () |
E.g., the "0" in SunPro C++ 4.32.0. | |
int | out_of_handles (int error) |
bool | wild_match (const char *s, const char *pattern, bool case_sensitive=true, bool character_classes=false) |
template<class T , typename = typename std::enable_if<std::is_base_of<ACE_Event_Handler, T>::value>::type, typename ... Args> | |
ACE_Event_Handler_var | make_event_handler (Args &&...args) |
int | set_flags (ACE_HANDLE handle, int flags) |
Set flags associated with handle. | |
int | clr_flags (ACE_HANDLE handle, int flags) |
Clear flags associated with handle. | |
int | get_flags (ACE_HANDLE handle) |
Return the current setting of flags associated with handle. | |
ACE_HANDLE | handle_timed_open (ACE_Time_Value *timeout, const ACE_TCHAR *name, int flags, int perms, LPSECURITY_ATTRIBUTES sa=0) |
int | init () |
int | fini () |
int | ldfind (const ACE_TCHAR *filename, ACE_TCHAR pathname[], size_t maxpathnamelen) |
FILE * | ldopen (const ACE_TCHAR *filename, const ACE_TCHAR *type) |
ACE_TCHAR * | ldname (const ACE_TCHAR *entry_point) |
int | get_temp_dir (ACE_TCHAR *buffer, size_t buffer_len) |
ACE_HANDLE | open_temp_file (const ACE_TCHAR *name, int mode, int perm=0) |
size_t | strrepl (char *s, char search, char replace) |
char * | strsplit_r (char *s, const char *token, char *&next_start) |
size_t | strrepl (wchar_t *s, wchar_t search, wchar_t replace) |
As strrepl, but for wide characters. | |
wchar_t * | strsplit_r (wchar_t *s, const wchar_t *token, wchar_t *&next_start) |
As strsplit_r, but for wide characters. | |
int | bind_port (ACE_HANDLE handle, ACE_UINT32 ip_addr=INADDR_ANY, int address_family=AF_UNSPEC) |
Bind a new unused port to handle. | |
int | get_bcast_addr (ACE_UINT32 &bcast_addr, const ACE_TCHAR *hostname=0, ACE_UINT32 host_addr=0, ACE_HANDLE handle=ACE_INVALID_HANDLE) |
int | get_fqdn (ACE_INET_Addr const &addr, char hostname[], size_t len) |
Get fully qualified host/domain name. | |
int | get_ip_interfaces (size_t &count, ACE_INET_Addr *&addr_array) |
int | count_interfaces (ACE_HANDLE handle, size_t &how_many) |
ACE_HANDLE | get_handle () |
bool | ipv4_enabled () |
int | ipv6_enabled () |
I/O operations | |
Notes on common parameters: handle is the connected endpoint that will be used for I/O. buf is the buffer to write from or receive into. len is the number of bytes to transfer. The timeout parameter in the following methods indicates how long to blocking trying to transfer data. If timeout == 0, then the call behaves as a normal send/recv call, i.e., for blocking sockets, the call will block until action is possible; for non-blocking sockets, If timeout != 0, the call will wait until the relative time specified in *timeout elapses. The "_n()" I/O methods keep looping until all the data has been transferred. These methods also work for sockets in non-blocking mode i.e., they keep looping on The return values for the "*_n()" methods match the return values from the non "_n()" methods and are specified as follows:
On partial transfers, i.e., if any data is transferred before timeout / error / Methods with iovec parameter are I/O vector variants of the I/O operations. Methods with the extra flags argument will always result in | |
ssize_t | recv (ACE_HANDLE handle, void *buf, size_t len, int flags, const ACE_Time_Value *timeout=0) |
Receive into a variable number of pieces. | |
ssize_t | t_rcv (ACE_HANDLE handle, void *buf, size_t len, int *flags, const ACE_Time_Value *timeout=0) |
Receive into a variable number of pieces. | |
ssize_t | recv (ACE_HANDLE handle, void *buf, size_t len, const ACE_Time_Value *timeout=0) |
Receive into a variable number of pieces. | |
ssize_t | recvmsg (ACE_HANDLE handle, struct msghdr *msg, int flags, const ACE_Time_Value *timeout=0) |
Receive into a variable number of pieces. | |
ssize_t | recvfrom (ACE_HANDLE handle, char *buf, int len, int flags, struct sockaddr *addr, int *addrlen, const ACE_Time_Value *timeout=0) |
Receive into a variable number of pieces. | |
ssize_t | recv_n (ACE_HANDLE handle, void *buf, size_t len, int flags, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0) |
Receive into a variable number of pieces. | |
ssize_t | t_rcv_n (ACE_HANDLE handle, void *buf, size_t len, int *flags, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0) |
Receive into a variable number of pieces. | |
ssize_t | recv_n (ACE_HANDLE handle, void *buf, size_t len, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0) |
Receive into a variable number of pieces. | |
ssize_t | recv (ACE_HANDLE handle, size_t n,...) |
Receive into a variable number of pieces. | |
ssize_t | recvv (ACE_HANDLE handle, iovec *iov, int iovcnt, const ACE_Time_Value *timeout=0) |
Receive into a variable number of pieces. | |
ssize_t | recvv_n (ACE_HANDLE handle, iovec *iov, int iovcnt, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0) |
Receive into a variable number of pieces. | |
ssize_t | recv_n (ACE_HANDLE handle, ACE_Message_Block *message_block, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0) |
Receive into a variable number of pieces. | |
ssize_t | send (ACE_HANDLE handle, const void *buf, size_t len, int flags, const ACE_Time_Value *timeout=0) |
Receive into a variable number of pieces. | |
ssize_t | t_snd (ACE_HANDLE handle, const void *buf, size_t len, int flags, const ACE_Time_Value *timeout=0) |
Receive into a variable number of pieces. | |
ssize_t | send (ACE_HANDLE handle, const void *buf, size_t len, const ACE_Time_Value *timeout=0) |
Receive into a variable number of pieces. | |
ssize_t | sendmsg (ACE_HANDLE handle, const struct msghdr *msg, int flags, const ACE_Time_Value *timeout=0) |
Receive into a variable number of pieces. | |
ssize_t | sendto (ACE_HANDLE handle, const char *buf, int len, int flags, const struct sockaddr *addr, int addrlen, const ACE_Time_Value *timeout=0) |
Receive into a variable number of pieces. | |
ssize_t | send_n (ACE_HANDLE handle, const void *buf, size_t len, int flags, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0) |
Receive into a variable number of pieces. | |
ssize_t | t_snd_n (ACE_HANDLE handle, const void *buf, size_t len, int flags, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0) |
Receive into a variable number of pieces. | |
ssize_t | send_n (ACE_HANDLE handle, const void *buf, size_t len, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0) |
Receive into a variable number of pieces. | |
ssize_t | send (ACE_HANDLE handle, size_t n,...) |
Varargs variant. | |
ssize_t | sendv (ACE_HANDLE handle, const iovec *iov, int iovcnt, const ACE_Time_Value *timeout=0) |
Receive into a variable number of pieces. | |
ssize_t | sendv_n (ACE_HANDLE handle, const iovec *iov, int iovcnt, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0) |
Receive into a variable number of pieces. | |
ssize_t | send_n (ACE_HANDLE handle, const ACE_Message_Block *message_block, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0) |
ssize_t | read_n (ACE_HANDLE handle, void *buf, size_t len, size_t *bytes_transferred=0) |
Receive into a variable number of pieces. | |
ssize_t | write_n (ACE_HANDLE handle, const void *buf, size_t len, size_t *bytes_transferred=0) |
Receive into a variable number of pieces. | |
ssize_t | write_n (ACE_HANDLE handle, const ACE_Message_Block *message_block, size_t *bytes_transferred=0) |
ssize_t | readv_n (ACE_HANDLE handle, iovec *iov, int iovcnt, size_t *bytes_transferred=0) |
Receive into a variable number of pieces. | |
ssize_t | writev_n (ACE_HANDLE handle, const iovec *iov, int iovcnt, size_t *bytes_transferred=0) |
Receive into a variable number of pieces. | |
int | handle_timed_accept (ACE_HANDLE listener, ACE_Time_Value *timeout, bool restart) |
Wait up to timeout amount of time to accept a connection. | |
ACE_HANDLE | handle_timed_complete (ACE_HANDLE listener, const ACE_Time_Value *timeout, int is_tli=0) |
int | set_handle_limit (int new_limit=-1, int increase_limit_only=0) |
int | max_handles () |
ACE_TCHAR * | strenvdup (const ACE_TCHAR *str) |
const char * | strend (const char *s) |
char * | strnew (const char *s) |
void | strdelete (char *s) |
Delete the memory allocated by strnew . | |
char * | strndup (const char *str, size_t n) |
char * | strnnew (const char *str, size_t n) |
bool | isdotdir (const char *s) |
Determine if a specified pathname is "dot dir" (ie. "." or ".."). | |
const wchar_t * | strend (const wchar_t *s) |
Receive into a variable number of pieces. | |
wchar_t * | strnew (const wchar_t *s) |
Receive into a variable number of pieces. | |
void | strdelete (wchar_t *s) |
Receive into a variable number of pieces. | |
wchar_t * | strndup (const wchar_t *str, size_t n) |
Receive into a variable number of pieces. | |
wchar_t * | strnnew (const wchar_t *str, size_t n) |
Receive into a variable number of pieces. | |
bool | isdotdir (const wchar_t *s) |
Receive into a variable number of pieces. | |
const ACE_TCHAR * | execname (const ACE_TCHAR *pathname) |
const ACE_TCHAR * | basename (const ACE_TCHAR *pathname, ACE_TCHAR delim=ACE_DIRECTORY_SEPARATOR_CHAR) |
const ACE_TCHAR * | dirname (const ACE_TCHAR *pathname, ACE_TCHAR delim=ACE_DIRECTORY_SEPARATOR_CHAR) |
ACE_TCHAR * | timestamp (const ACE_Time_Value &time_value, ACE_TCHAR date_and_time[], size_t time_len, bool return_pointer_to_first_digit=false) |
ACE_TCHAR * | timestamp (ACE_TCHAR date_and_time[], size_t time_len, bool return_pointer_to_first_digit=false) |
pid_t | fork (const ACE_TCHAR *program_name=ACE_TEXT("<unknown>"), int avoid_zombies=0) |
int | daemonize (const ACE_TCHAR pathname[]=ACE_TEXT("/"), bool close_all_handles=ACE_DEFAULT_CLOSE_ALL_HANDLES, const ACE_TCHAR program_name[]=ACE_TEXT("<unknown>")) |
size_t | round_to_pagesize (size_t len) |
Rounds the request to a multiple of the page size. | |
size_t | round_to_allocation_granularity (size_t len) |
Rounds the request to a multiple of the allocation granularity. | |
size_t | format_hexdump (const char *buffer, size_t size, ACE_TCHAR *obuf, size_t obuf_sz) |
u_long | hash_pjw (const char *str) |
Computes the hash value of {str} using the "Hash PJW" routine. | |
u_long | hash_pjw (const char *str, size_t len) |
Computes the hash value of {str} using the "Hash PJW" routine. | |
u_long | hash_pjw (const wchar_t *str) |
Computes the hash value of {str} using the "Hash PJW" routine. | |
u_long | hash_pjw (const wchar_t *str, size_t len) |
Computes the hash value of {str} using the "Hash PJW" routine. | |
ACE_UINT16 | crc_ccitt (const char *str) |
Computes CRC-CCITT for the string. | |
ACE_UINT16 | crc_ccitt (const void *buf, size_t len, ACE_UINT16 crc=0) |
Computes CRC-CCITT for the buffer. | |
ACE_UINT16 | crc_ccitt (const iovec *iov, int len, ACE_UINT16 crc=0) |
Computes CRC-CCITT for the @ len iovec buffers. | |
ACE_UINT32 | crc32 (const char *str) |
Computes the ISO 8802-3 standard 32 bits CRC for the string. | |
ACE_UINT32 | crc32 (const void *buf, size_t len, ACE_UINT32 crc=0) |
Computes the ISO 8802-3 standard 32 bits CRC for the buffer. | |
ACE_UINT32 | crc32 (const iovec *iov, int len, ACE_UINT32 crc=0) |
u_long | gcd (u_long x, u_long y) |
Euclid's greatest common divisor algorithm. | |
u_long | minimum_frame_size (u_long period1, u_long period2) |
Calculates the minimum enclosing frame size for the given values. | |
u_long | is_prime (const u_long n, const u_long min_factor, const u_long max_factor) |
int | map_errno (int error) |
const ACE_TCHAR * | sock_error (int error) |
bool | is_sock_error (int error) |
int | process_active (pid_t pid) |
int | terminate_process (pid_t pid) |
void | unique_name (const void *object, ACE_TCHAR *name, size_t length) |
u_long | log2 (u_long num) |
Computes the base 2 logarithm of {num}. | |
template<typename T > | |
bool | is_equal (const T &a, const T &b) |
template<typename T > | |
bool | is_inequal (const T &a, const T &b) |
ACE_TCHAR | nibble2hex (u_int n) |
Hex conversion utility. | |
u_char | hex2byte (ACE_TCHAR c) |
Convert a hex character to its byte representation. | |
bool | debug () |
Receive into a variable number of pieces. | |
void | debug (bool onoff) |
Receive into a variable number of pieces. | |
int | select (int width, ACE_Handle_Set *readfds, ACE_Handle_Set *writefds=0, ACE_Handle_Set *exceptfds=0, const ACE_Time_Value *timeout=0) |
Wrapper facade for select that uses ACE_Handle_Sets . | |
int | select (int width, ACE_Handle_Set &readfds, const ACE_Time_Value *timeout=0) |
int | handle_read_ready (ACE_HANDLE handle, const ACE_Time_Value *timeout) |
int | handle_write_ready (ACE_HANDLE handle, const ACE_Time_Value *timeout) |
int | handle_exception_ready (ACE_HANDLE handle, const ACE_Time_Value *timeout) |
int | handle_ready (ACE_HANDLE handle, const ACE_Time_Value *timeout, bool read_ready, bool write_ready, bool exception_ready) |
int | enter_recv_timedwait (ACE_HANDLE handle, const ACE_Time_Value *timeout, int &val) |
int | enter_send_timedwait (ACE_HANDLE handle, const ACE_Time_Value *timeout, int &val) |
void | record_and_set_non_blocking_mode (ACE_HANDLE handle, int &val) |
void | restore_non_blocking_mode (ACE_HANDLE handle, int val) |
ssize_t | recv_i (ACE_HANDLE handle, void *buf, size_t len) |
Receive into a variable number of pieces. | |
ssize_t | recv_n_i (ACE_HANDLE handle, void *buf, size_t len, int flags, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | recv_n_i (ACE_HANDLE handle, void *buf, size_t len, int flags, const ACE_Time_Value *timeout, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | t_rcv_n_i (ACE_HANDLE handle, void *buf, size_t len, int *flags, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | t_rcv_n_i (ACE_HANDLE handle, void *buf, size_t len, int *flags, const ACE_Time_Value *timeout, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | recv_n_i (ACE_HANDLE handle, void *buf, size_t len, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | recv_n_i (ACE_HANDLE handle, void *buf, size_t len, const ACE_Time_Value *timeout, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | recvv_n_i (ACE_HANDLE handle, iovec *iov, int iovcnt, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | recvv_n_i (ACE_HANDLE handle, iovec *iov, int iovcnt, const ACE_Time_Value *timeout, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | send_i (ACE_HANDLE handle, const void *buf, size_t len) |
Receive into a variable number of pieces. | |
ssize_t | send_n_i (ACE_HANDLE handle, const void *buf, size_t len, int flags, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | send_n_i (ACE_HANDLE handle, const void *buf, size_t len, int flags, const ACE_Time_Value *timeout, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | t_snd_n_i (ACE_HANDLE handle, const void *buf, size_t len, int flags, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | t_snd_n_i (ACE_HANDLE handle, const void *buf, size_t len, int flags, const ACE_Time_Value *timeout, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | send_n_i (ACE_HANDLE handle, const void *buf, size_t len, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | send_n_i (ACE_HANDLE handle, const void *buf, size_t len, const ACE_Time_Value *timeout, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | sendv_n_i (ACE_HANDLE handle, const iovec *iov, int iovcnt, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
ssize_t | sendv_n_i (ACE_HANDLE handle, const iovec *iov, int iovcnt, const ACE_Time_Value *timeout, size_t *bytes_transferred) |
Receive into a variable number of pieces. | |
Variables | |
size_t | allocation_granularity_ = 0 |
size_t | pagesize_ = 0 |
bool | debug_ = false |
unsigned int | init_fini_count_ = 0 |
The namespace containing the ACE framework itself.
The ACE namespace contains all types (classes, structures, typedefs, etc), and global functions and variables in the ACE framework.
|
extern |
Returns the "basename" of a pathname separated by delim. For instance, the basename of "/tmp/foo.cpp" is "foo.cpp" when delim is '/'.
|
extern |
|
extern |
Bind a new unused port to handle.
|
extern |
Clear flags associated with handle.
|
extern |
Helper routine for get_ip_interfaces, differs by UNIX platform so put into own subroutine. perform some ioctls to retrieve ifconf list of ifreq structs.
|
extern |
Computes the ISO 8802-3 standard 32 bits CRC for the string.
|
extern |
Computes the ISO 8802-3 standard 32 bits CRC for the @ len iovec buffers.
|
extern |
Computes the ISO 8802-3 standard 32 bits CRC for the buffer.
|
extern |
Computes CRC-CCITT for the string.
|
extern |
Computes CRC-CCITT for the @ len iovec buffers.
|
extern |
Computes CRC-CCITT for the buffer.
|
extern |
Become a daemon process using the algorithm in Richard Stevens "Advanced Programming in the UNIX Environment." If close_all_handles is non-zero then all open file handles are closed.
Make the current process a UNIX daemon. This is based on Stevens code from APUE.
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Returns the "dirname" of a pathname. For instance, the dirname of "/tmp/foo.cpp" is "/tmp" when delim is '/'. If pathname has no delim ".\0" is returned. This method does not modify pathname and is not reentrant.
|
extern |
Wait for timeout before proceeding to a recv
operation. val keeps track of whether we're in non-blocking mode or not.
|
extern |
Wait for timeout before proceeding to a send
operation. val keeps track of whether we're in non-blocking mode or not.
On Windows, determines if a specified pathname ends with ".exe" (not case sensitive). If on Windows and there is no ".exe" suffix, a new ACE_TCHAR array is allocated and a copy of pathname
with the ".exe" suffix is copied into it. In this case, the caller is responsible for calling delete [] on the returned pointer.
pathname | The name to check for a proper suffix. |
c pathname if there is a proper suffix for Windows. This is always the return value for non-Windows platforms.
If | a suffix needs to be added, returns a pointer to new[] allocated memory containing the original pathname plus a ".exe" suffix. The caller is responsible for freeing the memory using delete []. |
|
extern |
Finalize the ACE library services and releases ACE's internal resources. In general, do not instantiate ACE classes or call methods on objects of these classes after ACE::fini() has been called.
|
extern |
if avoid_zombies == 0 call ACE_OS::fork
directly, else create an orphan process that's inherited by the init process; init cleans up when the orphan process terminates so we don't create zombies. Returns -1 on failure and either the child PID on success if avoid_zombies == 0 or 1 on success if avoid_zombies != 0 (this latter behavior is a known bug that needs to be fixed).
|
extern |
Format buffer into printable format. This is useful for debugging.
Format buffer into printable format. This is useful for debugging. Portions taken from mdump by J.P. Knight (J.P.K.nosp@m.nigh.nosp@m.t@lut.nosp@m..ac..nosp@m.uk) Modifications by Todd Montgomery.
|
extern |
Get our broadcast address based on our host_addr. If hostname is non-0 we'll use it to determine our IP address. If handle is not ACE_INVALID_HANDLE then we'll use this to determine our broadcast address, otherwise we'll have to create a socket internally (and free it). Returns -1 on failure and 0 on success.
|
inline |
Return the current setting of flags associated with handle.
|
extern |
Get fully qualified host/domain name.
|
extern |
Routine to return a handle from which ioctl
requests can be made. Caller must close the handle.
|
extern |
Return count and array of all configured IP interfaces on this host, rc = 0 on success (count == number of interfaces else -1). Caller is responsible for calling delete [] on addr_array.
Returns the temporary directory including the trailing slash in buffer. Returns -1 for an error or if the buffer_len is not long enough.
|
inline |
Timed wait for handle to get exception ready.
-1 | for error |
0 | for timeout |
1 | the handle is ready |
|
inline |
Timed wait for handle to get read ready.
-1 | for error |
0 | for timeout |
1 | the handle is ready |
|
extern |
Timed wait for handle to get read, write, or exception ready.
-1 | for error |
0 | for timeout |
1 | the handle is ready |
|
extern |
Wait up to timeout amount of time to accept a connection.
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.
|
extern |
Wait up to timeout amount of time to complete an actively established non-blocking connection. If is_tli is non-0 then we are being called by a TLI wrapper (which behaves slightly differently from a socket wrapper).
|
extern |
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.
|
inline |
Timed wait for handle to get write ready.
-1 | for error |
0 | for timeout |
1 | the handle is ready |
Computes the hash value of {str} using the "Hash PJW" routine.
Computes the hash value of {str} using the "Hash PJW" routine.
Computes the hash value of {str} using the "Hash PJW" routine.
Computes the hash value of {str} using the "Hash PJW" routine.
|
extern |
This method initializes the ACE library services and initializes ACE's internal resources. Applications should not instantiate ACE classes or call methods on objects of these classes until ACE::init() returns successfully.
|
extern |
Returns true
if IPv4 is enabled on the current host; false
if not. This is an execution-time check. If ACE has not been compiled with ACE_HAS_IPV6
, it always returns true
. This function tries to create a PF_INET
socket, returning true
if it succeeds, and false
if it fails. Caches the result so it only gets checked once.
|
extern |
Returns 1 if IPv6 is enabled on the current host; 0 if not. This is an execution-time check. If ACE has not been compiled with ACE_HAS_IPV6, it always returns 0. If ACE_HAS_IPV6 is enabled, this function tries to create a PF_INET6 socket, returning 1 if it succeeds, and 0 if it fails. Caches the result so it only gets checked once.
Helper to avoid comparing floating point values with == (uses < and > operators).
Helper to avoid comparing floating point values with != (uses < and > operators).
Function that can burn up noticeable CPU time: brute-force determination of whether number n is prime. Returns 0 if it is prime, or the smallest factor if it is not prime. min_factor and max_factor can be used to partition the work among threads. For just one thread, typical values are 2 and n/2.
Determins whether the given error code corresponds to to a WinSock error. If so returns true, false otherwise.
Determine if a specified pathname is "dot dir" (ie. "." or "..").
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
Finds the file filename either using an absolute path or using a relative path in conjunction with ACE_LD_SEARCH_PATH (e.g., $LD_LIBRARY_PATH on UNIX or the directories scanned by Win32 API SearchPath on Win32). This function will add appropriate suffix (e.g., .dll on Win32 or .so on UNIX) according to the OS platform. In addition, this function will apply the appropriate prefix (e.g., "lib" on UNIX and "" on Win32) if the filename doesn't match directly.
Transforms entry_point into a form that can be located in a dynamic library using <dlsym>. For example, with Win32/Borland extern "C" functions which use the default calling convention have a '_' prepended. Always returns a buffer that has been dynamically allocated using <operator new>.
Uses ldfind
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.
|
inline |
With C++11 it is common to not use C++ new and delete, but use std::make_shared and std::make_unique. This will not work for ACE event handlers so we introduce a new ACE::make_event_handler which can be used in user code to allocate a new ACE event handler instance and directly assign it to a ACE_Event_Handler_var As user this now makes it for example possible to implement the following when Simple_Handler is derived from ACE_Event_Handler ACE_Event_Handler_var v = ACE::make_event_handler<Simple_Handler> (reactor.get());
Map troublesome win32 errno values to values that standard C strerr function understands. Thank you Microsoft.
|
extern |
Returns the maximum number of open handles currently permitted in this process. This maximum may be extended using ACE::set_handle_limit
.
|
extern |
Calculates the minimum enclosing frame size for the given values.
|
extern |
Opening the temp file. File is automagically unlinked when it is closed. This is useful for have temp files.
Check if error indicates the process being out of handles (file descriptors).
Checks if process with {pid} is still alive. Returns 1 if it is still alive, 0 if it isn't alive, and -1 if something weird happened.
|
inline |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
This makes sure that handle is set into non-blocking mode. val keeps track of whether were in non-blocking mode or not.
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
inline |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
inline |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
inline |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
inline |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Cleanup after a timed operation, restore the appropriate non-blocking status of handle.
Rounds the request to a multiple of the allocation granularity.
Rounds the request to a multiple of the page size.
This function rounds the request to a multiple of the page size.
|
extern |
Wrapper facade for the most common use of select
that uses ACE_Handle_Sets
.
|
extern |
Wrapper facade for select
that uses ACE_Handle_Sets
.
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Varargs variant.
|
inline |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Send all the message_blocks chained through their next
and cont
pointers. This call uses the underlying OS gather-write operation to reduce the domain-crossing penalty.
|
inline |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
inline |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
inline |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Set flags associated with handle.
Reset the limit on the number of open handles. If new_limit == -1 set the limit to the maximum allowable. Otherwise, set the limit value to new_limit. If increase_limit_only is non-0 then only allow increases to the limit.
Returns a string containing the error message corresponding to a WinSock error. This works around an omission in the Win32 API.
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
Returns a pointer to the "end" of the string, i.e., the character past the '\0'.
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
Return a dynamically allocated duplicate of str, substituting the environment variable if str
[0] ==
'$'
. Note that the pointer is allocated with ACE_OS::malloc
and must be freed by ACE_OS::free
.
Create a fresh new copy of str, up to n chars long. Uses ACE_OS::malloc
to allocate the new string.
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
This method is just like strdup
, except that it uses operator
new
rather than malloc
. If s is NULL returns NULL rather than segfaulting.
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
Create a fresh new copy of str, up to n chars long. Uses ACE_OS::malloc
to allocate the new string.
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
Replace all instances of search in s with replace. Returns the number of replacements made.
As strrepl, but for wide characters.
Splits string s into pieces separated by the string token. next_start is an opaque cookie handed back by the call to store its state for the next invocation, thus making it re-entrant. This operates very similar to Perl's split
function except that it returns pieces one at a time instead of into an array.
As strsplit_r, but for wide characters.
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
inline |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
inline |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
Terminate the process abruptly with id pid. On Win32 platforms this uses {TerminateProcess} and on POSIX platforms is uses {kill} with the -9 (SIGKILL) signal, which cannot be caught or ignored. Note that this call is potentially dangerous to use since the process being terminated may not have a chance to cleanup before it shuts down.
|
extern |
Translate the current time to ISO-8601 timestamp format.
date_and_time | Array to hold the timestamp. |
time_len | Size of date_and_time in ACE_TCHARs. Must be greater than or equal to 27. |
return_pointer_to_first_digit | If true, returned pointer value is to the first time digit, else to the space prior to the first time digit. See Return Values. |
0 | if unsuccessful, with errno set. If time_len is less than 27 errno will be EINVAL. |
If | successful, pointer to beginning of the "time" portion of date_and_time. If return_pointer_to_first_digit is false the pointer is actually to the space before the time, else the pointer is to the first time digit. |
Returns the current timestamp in the form "hour:minute:second:microsecond." The month, day, and year are also stored in the beginning of the date_and_time array using ISO-8601 format.
|
extern |
Translate the given timestamp to ISO-8601 format.
time_value | ACE_Time_Value to format. This is assumed to be an absolute time value. |
date_and_time | Array to hold the timestamp. |
time_len | Size of date_and_time in ACE_TCHARs. Must be greater than or equal to 27. |
return_pointer_to_first_digit | If true, returned pointer value is to the first time digit, else to the space prior to the first time digit. See Return Values. |
0 | if unsuccessful, with errno set. If time_len is less than 27 errno will be EINVAL. |
If | successful, pointer to beginning of the "time" portion of date_and_time. If return_pointer_to_first_digit is false the pointer is actually to the space before the time, else the pointer is to the first time digit. |
Returns the given timestamp in the form "hour:minute:second:microsecond." The month, day, and year are also stored in the beginning of the date_and_time array using ISO-8601 format. 012345678901234567890123456 2010-12-02 12:56:00.123456<nul>
This method uses process id and object pointer to come up with a machine wide unique name. The process ID will provide uniqueness between processes on the same machine. The "this" pointer of the {object} will provide uniqueness between other "live" objects in the same process. The uniqueness of this name is therefore only valid for the life of {object}.
|
extern |
Simple wildcard matching function supporting '*' and '?' return true if string s matches pattern. If character_classes is true, '[' is treated as a wildcard character as described in the fnmatch() POSIX API. The following POSIX "bracket expression" features are not implemented: collating symbols, equivalence class expressions, and character class expressions. The POSIX locale is assumed.
|
extern |
Write all the message_blocks chained through their next
and cont
pointers. This call uses the underlying OS gather-write operation to reduce the domain-crossing penalty.
|
inline |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
|
extern |
Receive into a variable number of pieces.
Accepts a variable, caller-specified, number of pointer/length pairs. Arguments following n are char *, size_t pairs.
handle | The I/O handle to receive on |
n | The total number of char *, size_t pairs following n. |
size_t ACE::allocation_granularity_ = 0 |
size_t ACE::pagesize_ = 0 |