Charles.Forsyth20060303-partialeea662d19 years agoHistory
71 lines · 1.6 KB · Text
RawDownload
.TH SYS-FVERSION 2.SH NAMEfversion \- initialize Styx connection and negotiate version.SH SYNOPSIS.EXinclude "sys.m";sys := load Sys Sys->PATH; fversion: fn(fd: ref FD, bufsize: int, version: string): (int, string);.EE.SH DESCRIPTION.B Fversioninitialises the Styx connection represented by.I fdand negotiates the maximum message size and the version of the protocol to be used..PPThe.I bufsizedetermines the size of the I/O buffer used to stage Styx requests to the server,subject to the constraints of the server itself.The.I versionis a text string that represents the highest version level the protocol will support..PP.B Fversionreturns a tuple.RI ( n , useversion )where.I nis -1 if the request was rejected, and otherwise.I nis.I bufsizeand.I useversionis a string representing the negotiated, possibly lower, version of the protocol..PPDefault values of zero for.I bufsizeand the empty string for.I versionwill negotiate sensible defaults for the connection..PPThe interpretation of the version strings is defined in.IR version (5)..PPIt is rare to use.BR fversiondirectly; usually the default negotiation performedby the kernel during.B mount(see.IR sys-bind (2))is sufficient..SH SEE ALSO.IR sys-fauth (2),.IR intro (5),.IR version (5)..SH DIAGNOSTICS.B Fversionreturns a value of -1 for.I non error, including failure to negotiate acceptable values,and sets the system error string..SH BUGSThe returned value of.I nwhen no error occurs should be the negotiated message sizebut is currently the original.I bufsizeparameter.