|
void | SetGlobalConfigEnvErrorFunction (GlobalConfigEnvErrorFunctionType func) |
|
int | JoinHostPort (grpc_core::UniquePtr< char > *out, const char *host, int port) |
| Given a host and port, creates a newly-allocated string of the form "host:port" or "[ho:st]:port", depending on whether the host contains colons like an IPv6 literal. More...
|
|
bool | SplitHostPort (StringView name, StringView *host, StringView *port) |
| Given a name in the form "host:port" or "[ho:st]:port", split into hostname and port number. More...
|
|
bool | SplitHostPort (StringView name, grpc_core::UniquePtr< char > *host, grpc_core::UniquePtr< char > *port) |
|
template<typename T , typename... Args> |
std::unique_ptr< T > | MakeUnique (Args &&... args) |
|
template<typename T , typename... Args> |
OrphanablePtr< T > | MakeOrphanable (Args &&... args) |
|
template<typename T , typename... Args> |
RefCountedPtr< T > | MakeRefCounted (Args &&... args) |
|
bool | operator== (StringView lhs, StringView rhs) |
|
bool | operator!= (StringView lhs, StringView rhs) |
|
StringView | StringViewFromSlice (const grpc_slice &slice) |
|
grpc_core::UniquePtr< char > | StringViewToCString (const StringView sv) |
|
int | StringViewCmp (const StringView lhs, const StringView rhs) |
|
void | grpc_tcp_set_write_timestamps_callback (void(*fn)(void *, grpc_core::Timestamps *, grpc_error *error)) |
| Sets the callback function to call when timestamps for a write are collected. More...
|
|
void | grpc_executor_global_init () |
|
void | grpc_errqueue_init () |
|
const char * | ConnectivityStateName (grpc_connectivity_state state) |
|
uint64_t | StaticMetadataInitCanary () |
|
Internal thread interface.
Weak hash table implementation.
Hash table implementation.
This implementation uses open addressing (https://en.wikipedia.org/wiki/Open_addressing) with linear probing (https://en.wikipedia.org/wiki/Linear_probing).
The keys are grpc_slice objects. The values can be any type.
Hash tables are intentionally immutable, to avoid the need for locking.
This entries in this table are weak: an entry may be removed at any time due to a number of reasons: memory pressure, hash collisions, etc.
The keys are grpc_slice objects. The values are of arbitrary type.
This class is thread unsafe. It's the caller's responsibility to ensure proper locking when accessing its methods.
Given a host and port, creates a newly-allocated string of the form "host:port" or "[ho:st]:port", depending on whether the host contains colons like an IPv6 literal.
If the host is already bracketed, then additional brackets will not be added.
Usage is similar to gpr_asprintf: returns the number of bytes written (excluding the final '\0'), and *out points to a string.
In the unlikely event of an error, returns -1 and sets *out to NULL.
Given a name in the form "host:port" or "[ho:st]:port", split into hostname and port number.
There are two variants of this method: 1) StringView output: port and host are returned as views on name. 2) char* output: port and host are copied into newly allocated strings.
Prefer variant (1) over (2), because no allocation or copy is performed in variant (1). Use (2) only when interacting with C API that mandate null-terminated strings.
Return true on success, false on failure. Guarantees *host and *port are cleared on failure.