Softanza
DémarrerEnglish
Softanza
La bibliothèque se documente elle-même · Interface et réactif

stzReactor

50 méthodes propres · 0 formes avec extensions, rangées sous leur méthode

la source: base/reactive/stzReactor.ring(s'ouvre dans un nouvel onglet) · Toutes les classes · La référence du domaine : Interface et réactif

Sous chaque méthode, ses extensions (Q CS XT Z ZZ IB W U) : en gras et cochée, elle existe ; barrée, elle n'existe pas. Les extensions et leur sens

Aucune méthode de cette classe n'est exécutée sur cette page : la classe touche aux fichiers, au réseau, aux processus, à l'horloge, au hasard ou au son, et un exemple exécuté ici ne serait que l'exemple de ses effets. Chaque méthode porte l'explication que la bibliothèque donne d'elle-même.

Méthode
Explication, telle que la source la porte
init
(sans commentaire dans la source : le nom se lit comme une phrase) initaucune extension
Handle
(sans commentaire dans la source : le nom se lit comme une phrase) handleaucune extension
Version
(sans commentaire dans la source : le nom se lit comme une phrase) versionaucune extension
SubmitTimer
── timers ───────────────────────────────────────────────aucune extension
AwaitTimer
Block up to nTimeoutMs for the timer; returns 0 (fired), -1 (running/timeout) or -2 (unknown id).aucune extension
Poll
(sans commentaire dans la source : le nom se lit comme une phrase) pollaucune extension
JobState
Non-draining peek: -2 unknown, -1 running, 0 ready-to-fetch.aucune extension
Pending
(sans commentaire dans la source : le nom se lit comme une phrase) pendingaucune extension
SubmitTcp
── async TCP request/response ───────────────────────────aucune extension
AwaitTcp
Block up to nTimeoutMs for the response body (empty on error/timeout).aucune extension
PollTcp
(sans commentaire dans la source : le nom se lit comme une phrase) poll tcpaucune extension
TcpLastStatus
(sans commentaire dans la source : le nom se lit comme une phrase) tcp last statusaucune extension
TcpRequest
Submit + await an async TCP request in one call; returns the body.aucune extension
SubmitSpawn
Run a subprocess on the loop, capture its stdout, report the exit code -- non-Haro workers run OFF-THREAD, drained via the job idiom. The command is the program followed by its arguments. Submit; acArgv = [ program, arg1, arg2, ... ]. Returns a job id.aucune extension
AwaitSpawn
Block up to nTimeoutMs for the child; returns its stdout.aucune extension
PollSpawn
(sans commentaire dans la source : le nom se lit comme une phrase) poll spawnaucune extension
SpawnLastStatus
(sans commentaire dans la source : le nom se lit comme une phrase) spawn last statusaucune extension
KillSpawn
Force-kill a spawned child by job id: send nSignum (default SIGKILL=9; SIGTERM=15). On Windows libuv maps these to TerminateProcess. Returns 0 on success, negative on error (-2 not found, -3 already exited, -4 not a spawn / no handle). The kill is mutex-guarded in the engine so it can't race the loop thread reaping the process on its own exit.aucune extension
KillSpawnHard
SIGKILL by default (the forceful stop for a wedged child).aucune extension
Spawn
Submit + await in one call; returns the child's stdout.aucune extension
SubmitHttp
A full HTTP(S) request runs on a libuv WORKER thread via curl (native Schannel TLS on Windows) and is drained through the job idiom -- so https:// is genuinely async, no TLS state machine on the loop. Methods: 0=GET 1=POST 2=PUT 3=DELETE 4=HEAD 5=OPTIONS 6=PATCH.aucune extension
AwaitHttp
(sans commentaire dans la source : le nom se lit comme une phrase) await httpaucune extension
PollHttp
(sans commentaire dans la source : le nom se lit comme une phrase) poll httpaucune extension
HttpLastStatus
HTTP status code of the last drained request (or < 0 on error).aucune extension
HttpGet
Submit + await a GET in one call; returns the response body.aucune extension
HttpPost
Submit + await a POST with a body; returns the response body.aucune extension
Listen
A listener lives on the loop thread; Haro drains EVENTS: [ :accept, nConn, "" ] / [ :data, nConn, cBytes ] / [ :closed, nConn, "" ] / [] when there is none. In http mode each :data event is ONE complete framed HTTP/1.1 request (headers + Content-Length body, pipelining-safe). Raw TCP stream listener (IoT/telemetry). nPort 0 = ephemeral. Returns the server id (>0) or a negative uv error code.aucune extension
ListenHttp
HTTP/1.1 listener: :data events carry complete requests.aucune extension
ListenStzm
STZM message-plane listener (distribution D0): each :data event is ONE complete STZM frame (header + payload). Unpack with StzmUnpack().aucune extension
ListenStzmTls
TLS-terminating STZM listener (D5): the same framed message plane over the same mbedTLS termination the HTTPS listener uses. A non-empty cCaPath verifies client certs; bRequireClient makes a valid one MANDATORY (mutual TLS node links).aucune extension
ConnectStzm
Persistent CLIENT CHANNEL to a peer (distribution D0). The dial is async: the channel id comes back immediately; link-up arrives as an :accept event on ServerPoll/Await (a failed dial as :closed). The channel then speaks the SAME calls a listener does -- ServerWrite to send, ServerPoll to receive, ServerStop to hang up. A link is a link, whichever side dialed.aucune extension
ConnectRaw
Raw-stream client channel (:data events carry stream chunks).aucune extension
ConnectStzmTls
STZM channel over CLIENT-role TLS (the mTLS counterpart of ListenTls, on the persistent link): this node PRESENTS cCertPath/cKeyPath for the peer's mutual check ("" for none) and VALIDATES the peer -- see _TlsVerifyMode() for what bVerify may be. Link-up (:accept) fires only when the handshake COMPLETES -- an up channel is a SECURE channel.aucune extension
WaitLinkUp
Block up to nTimeoutMs for the channel's link-up. Returns the conn id (> 0) to write on, or 0 (dial failed or timed out).aucune extension
ListenHttpTls
TLS-terminating HTTP listener: each connection runs an mbedTLS handshake (server cert cCertPath + key cKeyPath) before the plaintext HTTP framing -- so the events Haro drains are DECRYPTED requests and ServerWrite responses are encrypted transparently. A non-empty cCaPath turns on client-cert verification; bRequireClient = TRUE makes a valid client cert MANDATORY (mutual TLS). Returns the server id (>0) or a negative error (TLS setup errors are -10..-17). Engine-terminated TLS.aucune extension
ListenHttpsServer
One-way server TLS convenience (no client cert): serve HTTPS with just a server cert + key.aucune extension
TlsRequest
Send cRequest (raw HTTP bytes) to cHost:nPort over TLS and return the response bytes ("" on failure -- see TlsClientStatus). This node PRESENTS the client cert cCertPath/cKeyPath (for the peer's mutual check; pass "" for none), and VALIDATES the peer's server cert (hostname checked via SNI) -- see _TlsVerifyMode() for bVerify. A dedicated mbedTLS transport (PEM certs + mutual auth), separate from the curl path used for general outbound HTTPS.aucune extension
TlsGet
Convenience: build + send a GET over TLS. Same cert/verify semantics.aucune extension
TlsClientStatus
Result of the last TlsRequest: 0 ok, -1 connect, -2 handshake (an untrusted/invalid peer SERVER cert aborts here), -3 cert verify, -4 setup, -18 verification switched off without :InsecureNoVerify, -19 no trust anchor. NOTE: a server rejecting a MISSING client cert is enforced SERVER-side -- under TLS 1.3 the client's handshake still completes (status 0) but the protected response comes back EMPTY. So the authoritative "was I let in?" check is the RESPONSE body, not status.aucune extension
ServerPort
Actual bound port (useful after nPort = 0).aucune extension
ServerConns
tls client (the mtls counterpart to listenhttptls)aucune extension
ServerPoll
Drain one event without blocking; [] if none.aucune extension
ServerAwait
Block up to nTimeoutMs for one event; [] on timeout.aucune extension
ServerWrite
Write to a connection; bCloseAfter closes it once the write lands.aucune extension
ServerCloseConn
tls client (the mtls counterpart to listenhttptls)aucune extension
ServerSetInbox
Bounded inbox (distribution D1): cap the QUEUED data events with a declared overflow policy -- :DropOldest / :DropNewest / :Refuse (reject and hang up, so the sender observes it). nCap 0 = unbounded. Overflow is COUNTED (ServerOverflow), never silent.aucune extension
ServerOverflow
tls client (the mtls counterpart to listenhttptls)aucune extension
ServerPendingData
tls client (the mtls counterpart to listenhttptls)aucune extension
ServerStop
tls client (the mtls counterpart to listenhttptls)aucune extension
Destroy
── teardown ─────────────────────────────────────────────aucune extension