From 1291252a7b1317ad2dc13fbeb15f6e9d2d92192c Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 11 Jan 2009 23:07:44 +0000 Subject: A new feature has been added to Bu::Server. It's going to be trickier to implement in Bu::ItoServer, but I'll get to it. Basically you can trigger a "tick" any time you want and it will propegate as an onTick event to all active clients. You can also have these generated automatically everytime the system passes through a polling cycle. In this case, you should never ever write data to the socket every tick. It will cause your program to go bursurk. --- src/protocol.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/protocol.h') diff --git a/src/protocol.h b/src/protocol.h index 2c84bfd..64e5ca7 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -26,9 +26,10 @@ namespace Bu Protocol(); virtual ~Protocol(); - virtual void onNewConnection( Bu::Client *pClient )=0; - virtual void onNewData( Bu::Client *pClient )=0; + virtual void onNewConnection( Bu::Client *pClient ); + virtual void onNewData( Bu::Client *pClient ); virtual void onMessage( Bu::Client *pClient, const Bu::FString &sMsg ); + virtual void onTick( Bu::Client *pClient ); private: -- cgit v1.2.3