RpcHdr(3I)
β¨ RpcHdr β the header for remote procedure calls, bestie β¨
okay so this is RpcHdr(3I), straight out of the InterViews Reference Manual, and it's literally the little header that makes remote procedure calls happen. let's get into it π
πΈ SYNOPSIS πΈ
#include <Dispatch/rpchdr.h>
π¦ DESCRIPTION π¦
so an RpcHdr is what lets an RPC request get sent or received. that's the whole vibe.
to SEND an RPC request β you'd insert an RpcHdr into an rpcstream, then any arguments after it, and then flush the rpcstream if you wanted the request to go out immediately. and here's the cute part: the rpcstream automatically fills in each RPC request's length field. no cap, it does it for you. π«Ά
to RECEIVE an RPC request β you'd extract an RpcHdr from an rpcstream and then go examine the request() member to figure out which additional arguments you also need to extract. and if you need to estimate how much space to allocate? you can peek at the ndata() member too. π
π CONSTRUCTORS π
RpcHdr(void* writer, int request)RpcHdr(int request)RpcHdr()
so the first two constructors give you an initialized header for an outgoing RPC request, and the third one (the no-args one) gives you an uninitialized header for an incoming RPC request. π
to actually initialize the header, you'll have to store the request's protocol number. and if you want to route the RPC request to a specific reader on the peer's side, you can also store the address of the writer that's sending the RPC request. easy. β¨
π PUBLIC OPERATIONS π
unsigned long reader()int request()unsigned int ndata()
these three are how you get info about the RPC request, periodt:
reader()identifies the reader that should handle the RPC request. π«request()identifies the action that should be performed. π₯ndata()gives you the number of data bytes following the header β which is lowkey useful for estimating how much space you've gotta allocate to store an argument. π§
π SEE ALSO π
RpcReader(3I)RpcWriter(3I)rpcstream(3I)
go read the friends, bestie, they're all connected iykyk π
and that's the whole page!! this one came from InterViews, dated 27 March 1991 β iconic behavior fr fr, she's been serving since before most of us were born π π
π¦ where this page comes from
- debian bookworm: ivtools-dev 2.0.11d.a1-1+b4
- debian trixie: ivtools-dev 2.0.11d.a1-3+b4
- ubuntu jammy: ivtools-dev 2.0.11d.a1-1build1
- ubuntu noble: ivtools-dev 2.0.11d.a1-3build1
- ubuntu questing: ivtools-dev 2.0.11d.a1-3build7
- ubuntu resolute: ivtools-dev 2.0.11d.a1-3build9
- ubuntu stonking: ivtools-dev 2.1.1+git.2025.07.26.a1-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms