#define NODISCARD
Definition CompilerSupport.h:59
#define CBL_CORE_API
Definition c4Compat.h:134
#define C4NULLABLE
Definition c4Compat.h:38
#define C4API
Definition c4Compat.h:114
#define C4_ASSUME_NONNULL_BEGIN
Definition c4Compat.h:36
#define C4API_END_DECLS
Definition c4Compat.h:116
#define C4API_BEGIN_DECLS
Definition c4Compat.h:115
#define C4_ASSUME_NONNULL_END
Definition c4Compat.h:37
struct C4Socket C4Socket
Represents an open bidirectional stream of bytes or messages (typically a TCP socket....
Definition c4Base.h:178
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_closed(C4Socket *socket, C4Error errorIfAny)
Notifies LiteCore that a socket has finished closing, or disconnected, or failed to open.
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_gotHTTPResponse(C4Socket *socket, int httpStatus, C4Slice responseHeadersFleece)
Notification that a socket has received an HTTP response, with the given headers (encoded as a Fleece...
CBL_CORE_API void c4socket_opened(C4Socket *socket)
Notifies LiteCore that a socket has opened, i.e.
CBL_CORE_API void c4socket_received(C4Socket *socket, C4Slice data)
Notifies LiteCore that data was received from the socket.
CBL_CORE_API void c4socket_registerFactory(C4SocketFactory factory)
One-time registration of default socket callbacks.
NODISCARD CBL_CORE_API C4Socket * c4socket_fromNative(C4SocketFactory factory, void *nativeHandle, const C4Address *address)
Constructs a C4Socket from a "native handle", whose interpretation is up to the C4SocketFactory.
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.
A simple parsed-URL type.
Definition c4ReplicatorTypes.h:56
An error value.
Definition c4Error.h:133
A group of callbacks that define the implementation of sockets; the client must fill this out and pas...
Definition c4SocketTypes.h:59
A simple reference to a block of memory.
Definition FLSlice.h:45