From 412fd9f7ce0f34a24f9cc2ffc36d3f670b8ad135 Mon Sep 17 00:00:00 2001 From: chatty Date: Tue, 27 Jul 1993 14:01:53 +0000 Subject: Added member Mpx --- comm/Channel.cc | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'comm') 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?*/ -- cgit v1.1