C

UCall for C

1.0.0-rc.1 · 60202332

Every operation that can fail takes its named argument struct and writes a ucall_outcome_t. Getters that cannot fail and handle release functions take their arguments directly. The Python and Rust bindings wrap this ABI and keep its polling model: the application starts every thread.

Topics

Installation5Link ucall::static or ucall::shared, each a single library containing every enabled backend.
Quickstartexamples/hello.c initializes a server on one interface, registers an echo route, and polls its event loop until stopped.
Serving21Initialize the server and register routes before polling.
Requests32Request handles own immutable received bytes and can outlive their callback until a reply consumes them or the server is freed.
Files and Streams2A streamed reply is chunked for HTTP/1.1 peers, keeps identity framing when its headers declare Content-Length, and is delimited by the close for HTTP/1.0 peers; a chunk reports ucallstatuswouldblockk while the socket lags too far behind.
Batches4Batch callbacks receive a counted array of retained request handles, followed by the registered context.
Calling15ucallclientcall() returns a synchronous acceptance outcome; success guarantees one completion and refusal produces none.
Noise Keys5XX and IK servers authenticate clients; KK clients connect to a separately configured peer, and a KK server interface names its preknown initiator in noisepeerkey.
Errors4
Threads and Polling1UCall creates no threads.
Design