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/PortServer.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 comm/OLD/PortServer.h (limited to 'comm/OLD/PortServer.h') diff --git a/comm/OLD/PortServer.h b/comm/OLD/PortServer.h new file mode 100644 index 0000000..1cd8ff5 --- /dev/null +++ b/comm/OLD/PortServer.h @@ -0,0 +1,48 @@ +/* + * The Unix Channel + * + * by Michel Beaudouin-Lafon + * + * Copyright 1990-1993 + * Laboratoire de Recherche en Informatique (LRI) + * + * Port server : client side + * + * $Id$ + * $CurLog$ + */ + +#ifndef PortServer_H_ +#define PortServer_H_ + +#include "Socket.h" +#include "ccu/String.h" +class UchDatagram; + +typedef int (* PortServMatchFun) (const char*, lword, sword, const char*); + +class UchPortServer { +protected: + UchDatagram* Serv; + CcuString Name; + +public: + UchPortServer (const char*, const char* = 0); + ~UchPortServer (); + + void Register (const char*, UchInetAddress&, int = 0); + void Remove (const char*, UchInetAddress&, int = 0); + UchInetAddress* Inquire (const char*, int = 10); + int Match (const char*, PortServMatchFun, int = 10); + void Dump (); + void Quit (); + char* MakeKey (const char*); +}; + +extern void PortServerRegister (const char*, const char*, UchInetAddress&); +extern void PortServerRemove (const char*, const char*, UchInetAddress&); +inline void PortServerRegister (const char* s, const char* h, UchAddress* a) { PortServerRegister (s, h, * ((UchInetAddress*) a)); } +inline void PortServerRemove (const char* s, const char* h, UchAddress* a) { PortServerRemove (s, h, * ((UchInetAddress*) a)); } +extern UchInetAddress* PortServerInquire (const char*, const char*, const char* = 0); + +#endif /* PortServer_H_ */ -- cgit v1.1