diff options
Diffstat (limited to 'comm/OLD/PortServerReq.cc')
-rw-r--r-- | comm/OLD/PortServerReq.cc | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/comm/OLD/PortServerReq.cc b/comm/OLD/PortServerReq.cc new file mode 100644 index 0000000..5628408 --- /dev/null +++ b/comm/OLD/PortServerReq.cc @@ -0,0 +1,60 @@ +/* + * The Unix Channel + * + * by Michel Beaudouin-Lafon + * + * Copyright 1990-1993 + * Laboratoire de Recherche en Informatique (LRI) + * + * Port server requests + * + * $Id$ + * $CurLog$ + */ + +#include "PortServerReq.h" + +UchPortServerReq :: UchPortServerReq () +: UchMessage (), + Type (0), + Host (0), + Port (0), + Ident (0), + Key (0) +{ +} + +UchPortServerReq :: UchPortServerReq (sword t) +: Type (t), + Host (0), + Port (0), + Ident (0), + Key (0) +{ +} + +UchPortServerReq :: UchPortServerReq (sword t, lword h, sword p, lword i, const char* k) +: Type (t), + Host (h), + Port (p), + Ident (i), + Key (k) +{ +} + +UchPortServerReq :: ~UchPortServerReq () +{ +} + +void +UchPortServerReq :: ReadFrom (UchMsgBuffer& b, lword) +{ + b >> Type >> Host >> Port >> Ident; + Key = b.BufLength () ? (const char*) b.Buffer () : 0; +} + +void +UchPortServerReq :: WriteTo (UchMsgBuffer& b) +{ + b << Type << Host << Port << Ident << (char*) Key; +} |