From ba066c34dde204aa192d03a23a81356374d93731 Mon Sep 17 00:00:00 2001 From: chatty Date: Wed, 7 Apr 1993 11:50:31 +0000 Subject: Initial revision --- comm/OLD/PortServerReq.cc | 60 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 comm/OLD/PortServerReq.cc (limited to 'comm/OLD/PortServerReq.cc') 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; +} -- cgit v1.1