summaryrefslogtreecommitdiff
path: root/comm
diff options
context:
space:
mode:
Diffstat (limited to 'comm')
-rw-r--r--comm/OLD/Server.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/comm/OLD/Server.h b/comm/OLD/Server.h
index 3724b15..d91a328 100644
--- a/comm/OLD/Server.h
+++ b/comm/OLD/Server.h
@@ -29,16 +29,14 @@ protected:
UchServer* MyServer;
public:
- UchClient ();
UchClient (const UchClient& cl);
- UchClient (UchChannel* ch);
+ UchClient (UchServer&, int);
~UchClient ();
UchChannel* Copy () const;
void Delete ();
inline UchServer* GetServer () { return MyServer; }
- void SetOwner (UchServer*);
};
class UchServer : public UchStream {
@@ -50,28 +48,23 @@ protected:
#else
CcuList Clients;
#endif
- pUchBaseMultiplexer Mpx;
public:
- UchServer ();
UchServer (const UchServer&);
- UchServer (UchAddress*);
+ UchServer (UchBaseMultiplexer&, UchAddress*);
~UchServer ();
UchChannel* Copy () const;
void HandleRead ();
- bool Setup (UchBaseMultiplexer* cs = 0);
-inline UchBaseMultiplexer* GetMultiplexer () { return Mpx; }
void RemoveClient (UchClient*);
- MPX_RES Run ();
void Unlisten ();
- void Broadcast (UchMessage&, bool = FALSE);
- void Broadcast (UchMessage&, UchClient*, bool = FALSE);
- void Broadcast (UchMsgBuffer&, bool = FALSE);
- void Broadcast (UchMsgBuffer&, UchClient*, bool = FALSE);
+ void Broadcast (UchMessage&, bool = false);
+ void Broadcast (UchMessage&, UchClient*, bool = false);
+ void Broadcast (UchMsgBuffer&, bool = false);
+ void Broadcast (UchMsgBuffer&, UchClient*, bool = false);
// called by HandleRead when a new client connects: must build up a client from a channel
-virtual UchClient* HandleNew (UchChannel*);
+virtual UchClient* CreateClient (int);
virtual void HandleRemove (UchClient*);
virtual bool SysError (errtype, const char*, int = 0, int = 0);
virtual void Error (errtype, const char*, const char*);