summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comm/OLD/Server.cc40
-rw-r--r--comm/OLD/Server.h8
2 files changed, 24 insertions, 24 deletions
diff --git a/comm/OLD/Server.cc b/comm/OLD/Server.cc
index e10b278..2f9dd73 100644
--- a/comm/OLD/Server.cc
+++ b/comm/OLD/Server.cc
@@ -44,7 +44,7 @@ Construct an empty server port.
UchServer :: UchServer ()
: UchStream (),
Clients (),
- ChanSet (0)
+ Mpx (0)
{
}
@@ -52,7 +52,7 @@ UchServer :: UchServer ()
UchServer :: UchServer (const UchServer& sp)
: UchStream (sp),
Clients (),
- ChanSet (0)
+ Mpx (0)
{
}
@@ -65,7 +65,7 @@ This can be done with the instruction \com{new UchInetAddress(ANYADDR)}.
UchServer :: UchServer (UchAddress* a)
: UchStream (a, 0),
Clients (),
- ChanSet (0)
+ Mpx (0)
{
}
@@ -76,7 +76,7 @@ UchServer :: ~UchServer ()
while (cl = Clients.First ())
cl->Delete ();
- ChanSet = 0; // will delete it if necessary
+ Mpx = 0; // will delete it if necessary
}
/*?nodoc?*/
@@ -117,7 +117,7 @@ A smart pointer to the channel set is actually kept in the server, so that it ca
securely.
?*/
bool
-UchServer :: Setup (UchMultiplexer* cs)
+UchServer :: Setup (UchBaseMultiplexer* cs)
{
if (Listen () < 0) {
SysError (ErrWarn, "UchServer::Setup");
@@ -126,8 +126,8 @@ UchServer :: Setup (UchMultiplexer* cs)
SetMode (IORead);
if (! cs)
cs = new UchMultiplexer;
- ChanSet = cs;
- ChanSet->Add (this);
+ Mpx = cs;
+ Mpx->Add (this);
return TRUE;
}
@@ -143,8 +143,8 @@ This is the only way to exit properly from \fun{Run}.
void
UchServer :: Unlisten ()
{
- if (ChanSet)
- ChanSet->Remove (*this);
+ if (Mpx)
+ Mpx->Remove (*this);
}
@@ -171,8 +171,8 @@ UchServer :: HandleRead ()
cl->SetMode (IOReadSelect);
cl->SetOwner (this);
Clients.Append (cl);
- if (ChanSet)
- ChanSet->Add (cl);
+ if (Mpx)
+ Mpx->Add (cl);
}
// Default virtual function for handling new connections
@@ -242,11 +242,11 @@ their \fun{HandleRead} and \fun{HandleWrite} functions will be called normally b
MPX_RES
UchServer :: Run ()
{
- if (! ChanSet)
+ if (! Mpx)
if (! Setup ())
Error (ErrFatal, "UchServer::Run", "could not setup");
- if (ChanSet)
- return ChanSet->LoopScan ();
+ if (Mpx)
+ return Mpx->Run ();
else
return isMpxError;
}
@@ -364,8 +364,8 @@ UchClient :: ~UchClient ()
UchServer* s = MyServer;
s->Error (ErrWarn, "~UchClient", "client still in a server; deleting anyway ...\n");
s->RemoveClient (this);
- if (s->ChanSet)
- s->ChanSet->Remove (*this); // calls the destructor if no more refs
+ if (s->Mpx)
+ s->Mpx->Remove (*this); // calls the destructor if no more refs
}
}
@@ -388,8 +388,8 @@ UchClient :: Delete ()
if (MyServer) {
UchServer* s = MyServer;
s->RemoveClient (this);
- if (s->ChanSet)
- s->ChanSet->Remove (*this); // calls the destructor if no more refs
+ if (s->Mpx)
+ s->Mpx->Remove (*this); // calls the destructor if no more refs
}
}
@@ -410,8 +410,8 @@ UchClient :: SetOwner (UchServer* serv)
Return the channel set used by the server.
This is useful if you want to add your own channels to the channel set.
?*/
-UchMultiplexer*
-UchServer :: GetChanSet ()
+UchBaseMultiplexer*
+UchServer :: GetMultiplexer ()
{
}
diff --git a/comm/OLD/Server.h b/comm/OLD/Server.h
index 71f24e2..3724b15 100644
--- a/comm/OLD/Server.h
+++ b/comm/OLD/Server.h
@@ -26,7 +26,7 @@ class UchClient : public UchMsgStream {
friend class UchServer;
protected:
- UchServer *MyServer;
+ UchServer* MyServer;
public:
UchClient ();
@@ -50,7 +50,7 @@ protected:
#else
CcuList Clients;
#endif
- pUchMultiplexer ChanSet;
+ pUchBaseMultiplexer Mpx;
public:
UchServer ();
@@ -61,8 +61,8 @@ public:
UchChannel* Copy () const;
void HandleRead ();
- bool Setup (UchMultiplexer* cs = 0);
-inline UchMultiplexer* GetMultiplexer () { return ChanSet; }
+ bool Setup (UchBaseMultiplexer* cs = 0);
+inline UchBaseMultiplexer* GetMultiplexer () { return Mpx; }
void RemoveClient (UchClient*);
MPX_RES Run ();
void Unlisten ();