summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comm/Channel.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/comm/Channel.cc b/comm/Channel.cc
index 9241fd7..4e81a16 100644
--- a/comm/Channel.cc
+++ b/comm/Channel.cc
@@ -190,7 +190,8 @@ Construct a closed channel.
?*/
UchChannel :: UchChannel ()
: Fd (),
- Mode (IONone)
+ Mode (IONone),
+ Mpx (0)
{
}
@@ -199,14 +200,16 @@ Construct an open channel on file descriptor \var{fd} with mode \var{io}.
?*/
UchChannel :: UchChannel (int fd, IOMODE io)
: Fd (fd),
- Mode (io)
+ Mode (io),
+ Mpx (0)
{
}
/*?nodoc?*/
UchChannel :: UchChannel (const UchChannel& ch)
: Fd (ch.Fd),
- Mode (ch.Mode)
+ Mode (ch.Mode),
+ Mpx (ch.Mpx)
{
}
@@ -253,17 +256,21 @@ UchChannel :: Copy () const
/*?nextdoc?*/
void
-UchChannel :: AddNotify (UchMultiplexer&)
+UchChannel :: Added (UchBaseMultiplexer& m)
{
+ Mpx = &m;
}
/*?
These virtual functions are called whenever a channel is added to (resp. removed from)
-a multiplexer. The default implementation does nothing.
+a multiplexer. The default implementation only store a pointer to the multiplexer (which
+can be retrieved through \fun{Getmultiplexer}).
?*/
void
-UchChannel :: RemoveNotify (UchMultiplexer&)
+UchChannel :: Removed (UchBaseMultiplexer& m)
{
+ if (Mpx == &m)
+ Mpx = 0;
}
/*?nextdoc?*/