summaryrefslogtreecommitdiff
path: root/comm/OLD/PortServer.h
diff options
context:
space:
mode:
authorchatty1993-04-07 11:50:31 +0000
committerchatty1993-04-07 11:50:31 +0000
commitba066c34dde204aa192d03a23a81356374d93731 (patch)
tree39391f6235d2cf8a59a0634ac5ea430cdd21f5d4 /comm/OLD/PortServer.h
parent05ab076e1c2a9ca16472f9a6b47b8d22914b3783 (diff)
downloadivy-league-ba066c34dde204aa192d03a23a81356374d93731.zip
ivy-league-ba066c34dde204aa192d03a23a81356374d93731.tar.gz
ivy-league-ba066c34dde204aa192d03a23a81356374d93731.tar.bz2
ivy-league-ba066c34dde204aa192d03a23a81356374d93731.tar.xz
Initial revision
Diffstat (limited to 'comm/OLD/PortServer.h')
-rw-r--r--comm/OLD/PortServer.h48
1 files changed, 48 insertions, 0 deletions
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_ */