typedef struct VtReq
int vtsrvhello(VtConn *z)
void vtrespond(VtReq *req)
These routines execute the server side of the
Vtsrvhello executes the server side of the initial
z->uid with the user name claimed by the other side.
Each new connection must be initialized by running
vtversion and then
vtsrvhello. The framework below takes care of this detail automatically;
vtsrvhello is provided for programs that do not use the functions below.
vtrespond provide a simple framework for writing Venti servers.
Vtlisten announces at the network address
addr, returning a fresh
VtSrv structure representing the service.
Vtgetreq waits for and returns
ping request from any client connected to
goodbye messages are handled internally and not returned to the client.
The interface does not distinguish between the
different clients that may be connected at any given time.
The request can be found in the
tx field of the returned
Once a request has been served and a response stored in
r->rx, the server should call
vtrespond to send the response to the client.
Vtrespond frees the structure
r as well as the packets