00001 /* 00002 $Id: subchannel.cpp,v 1.4 2001/03/17 07:29:34 vaidhy Exp $ 00003 00004 ------------------------------------------------------------------------ 00005 ClanLib, the platform independent game SDK. 00006 00007 This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE 00008 version 2. See COPYING for details. 00009 00010 For a total list of contributers see CREDITS. 00011 00012 ------------------------------------------------------------------------ 00013 */ 00014 00015 #ifdef WIN32 00016 #pragma warning (disable:4786) 00017 #endif 00018 00019 #include "API/Network/subchannel.h" 00020 #include "subchannel_generic.h" 00021 00022 CL_SubChannel::CL_SubChannel(const CL_SubChannel ©) 00023 : impl(copy.impl) 00024 { 00025 impl->add_ref(); 00026 } 00027 00028 CL_SubChannel::CL_SubChannel(int netchannel) 00029 : impl(new CL_SubChannel_Generic(netchannel)) 00030 { 00031 impl->add_ref(); 00032 } 00033 00034 CL_SubChannel::~CL_SubChannel() 00035 { 00036 if (impl != NULL && impl->release_ref() == 0) delete impl; 00037 } 00038 00039 CL_Slot CL_SubChannel::connect(int subchannel, CL_Slot_v1<const class CL_NetMessage &> *slot) 00040 { 00041 return impl->connect(subchannel, slot); 00042 } 00043 00044 void CL_SubChannel::disconnect(int subchannel, CL_Slot &slot) 00045 { 00046 impl->disconnect(subchannel, slot); 00047 }
1.2.6 written by Dimitri van Heesch,
© 1997-2001