|
LiteCore
Couchbase Lite cross-platform core implementation
|
#include "c4SocketTypes.h"Go to the source code of this file.
Functions | |
| CBL_CORE_API void | c4socket_registerFactory (C4SocketFactory factory) |
| One-time registration of default socket callbacks. | |
| CBL_CORE_API void | c4Socket_setNativeHandle (C4Socket *, void *) |
| Associates an opaque "native handle" with this object. | |
| CBL_CORE_API void * | c4Socket_getNativeHandle (C4Socket *) |
| Returns the opaque "native handle" associated with this object. | |
| CBL_CORE_API bool | c4socket_gotPeerCertificate (C4Socket *socket, C4Slice certData, C4String hostname) |
| Notifies LiteCore that a socket is making a TLS connection and has received the peer's (usually server's) certificate, so that it knows the cert and can call any custom auth callbacks. | |
| CBL_CORE_API void | c4socket_gotHTTPResponse (C4Socket *socket, int httpStatus, C4Slice responseHeadersFleece) |
| Notification that a client socket has received an HTTP response, with the headers encoded as a Fleece dictionary. | |
| CBL_CORE_API void | c4socket_opened (C4Socket *socket) |
| Notifies LiteCore that a socket has opened, i.e. | |
| CBL_CORE_API void | c4socket_closed (C4Socket *socket, C4Error errorIfAny) |
| Notifies LiteCore that a socket has finished closing, or disconnected, or failed to open. | |
| CBL_CORE_API void | c4socket_closeRequested (C4Socket *socket, int status, C4String message) |
| Notifies LiteCore that the peer has requested to close the socket using the WebSocket protocol. | |
| CBL_CORE_API void | c4socket_completedWrite (C4Socket *socket, size_t byteCount) |
| Notifies LiteCore that a C4SocketFactory.write request has been completed, i.e. | |
| CBL_CORE_API void | c4socket_received (C4Socket *socket, C4Slice data) |
| Notifies LiteCore that data was received from the socket. | |
| NODISCARD CBL_CORE_API C4Socket * | c4socket_fromNative (C4SocketFactory factory, void *nativeHandle, const C4Address *address) |
| NODISCARD CBL_CORE_API C4Socket * | c4socket_fromNative2 (C4SocketFactory factory, void *nativeHandle, const C4Address *address, bool incoming) |
| Constructs a C4Socket from a "native handle", whose interpretation is up to the C4SocketFactory. | |