About Store Forum Documentation Contact



Post Reply 
REPA() all clients?
Author Message
checkpointng Offline
Member

Post: #1
REPA() all clients?
Question:

Below is a small snip that works fine with only 1 client connected, however the moment i connect more, only my one client gets the DateTime updates, no one else :(

Code:
       File f;
       f.writeMem().putByte(CS_TEST);
       DateTime().getUTC().save(f);
       f.pos(0);
       REPA(clients)client(i).connection.dataFull(f, f.left()); // << THIS
       startTime = Time.curTime();

Im mainly trying to understand REPA, am i correct in thinking that its iterating thru all connected clients? If so why would it only send to 1 client even though i have 2 or 3 connected?

thanks,
checkpointng
(This post was last modified: 12-03-2011 10:31 PM by checkpointng.)
12-03-2011 10:30 PM
Find all posts by this user Quote this message in a reply
checkpointng Offline
Member

Post: #2
RE: REPA() all clients?
(12-03-2011 10:46 PM)aceio76 Wrote:  I believe by default, connection.dataFull(f, f.left()) only adds items to the data queue for that connection. You can try connection.dataFull(f, f.left(), true) to send the data right away.

aceio76! smile

Thanks, yep i had tried that till i saw in the header its set to True by default :(
12-03-2011 11:09 PM
Find all posts by this user Quote this message in a reply
checkpointng Offline
Member

Post: #3
RE: REPA() all clients?
inside void ClientServer::update() i have it so it only does it every 20sec.

Its strange, it seems only send the updates to the *last* client connected.
12-04-2011 03:12 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: REPA() all clients?
try reset file position before sending
f.pos(0)
12-04-2011 12:07 PM
Find all posts by this user Quote this message in a reply
Post Reply