summaryrefslogtreecommitdiff
path: root/comm/OLD/Server.cc
diff options
context:
space:
mode:
authorchatty1993-07-27 13:55:14 +0000
committerchatty1993-07-27 13:55:14 +0000
commit4f67aabc7baa77bdb27043f348ffaf7f6d43b4a1 (patch)
treeed8d98bd91af30f04546cdacd0611ddf0c769380 /comm/OLD/Server.cc
parente0b1bf56fae7f31706067564527156644a7a5fc2 (diff)
downloadivy-league-4f67aabc7baa77bdb27043f348ffaf7f6d43b4a1.zip
ivy-league-4f67aabc7baa77bdb27043f348ffaf7f6d43b4a1.tar.gz
ivy-league-4f67aabc7baa77bdb27043f348ffaf7f6d43b4a1.tar.bz2
ivy-league-4f67aabc7baa77bdb27043f348ffaf7f6d43b4a1.tar.xz
UchMultiplexer -> UchBaseMultiplexer
Diffstat (limited to 'comm/OLD/Server.cc')
-rw-r--r--comm/OLD/Server.cc40
1 files changed, 20 insertions, 20 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 ()
{
}