summaryrefslogtreecommitdiff
path: root/comm/Channel.cc
diff options
context:
space:
mode:
authorchatty1993-07-27 14:01:53 +0000
committerchatty1993-07-27 14:01:53 +0000
commit412fd9f7ce0f34a24f9cc2ffc36d3f670b8ad135 (patch)
tree5868fc07bc7286e95bdf22b3ce784f404c3ee66d /comm/Channel.cc
parentbec2e38bc77d58a6f74897fe6c806849457a9b4f (diff)
downloadivy-league-412fd9f7ce0f34a24f9cc2ffc36d3f670b8ad135.zip
ivy-league-412fd9f7ce0f34a24f9cc2ffc36d3f670b8ad135.tar.gz
ivy-league-412fd9f7ce0f34a24f9cc2ffc36d3f670b8ad135.tar.bz2
ivy-league-412fd9f7ce0f34a24f9cc2ffc36d3f670b8ad135.tar.xz
Added member Mpx
Diffstat (limited to 'comm/Channel.cc')
-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?*/