network help needed

Unknown W. Brackets unknown at simplemachines.org
Tue Oct 24 21:28:53 PDT 2006


Ah, sorry, still holding on to that audio terminology.  Of course, 
doubles as in double precision floating point numbers... heh.

So, 4kB/s is nothing to worry about.  Your typical 56k modem can do 7 
(56 / 8) kilobytes per second usually, so if you've got even 10 meg 
cable between the two boxes you'll have no problems with lag.

All you do is send the data when you feel like sending it.  If you want 
to limit the rate the data is sent at, send it at only that rate (being 
4 bytes per millisecond.)

The operating system does some buffering and etc., but so long as you're 
sending and the client is receiving, packets will get sent between.  If 
you do experience any problems with these buffers, you could pad the 
data or something... but I'd be surprised if you did.

If you're getting this from the eyetracker at 4 bytes per millisecond, 
just end it as you get it.  That should be fine.  Or, buffer it and send 
it every 10 milliseconds (being 40 bytes/10 milliseconds) - shouldn't 
really matter for an intranet connection.

-[Unknown]


>> Normally you want to use TCP because it provides a lot of groundwork for 
>> you.
>>
>> UDP, on the other hand, is sort of like shooting spitballs.  They usually 
>> make it but it's not as reliable.
>>
>> What's a double?  Is that two bytes?  What's going to matter for lag is 
>> how much data you're sending and the connection between the two computers. 
>> Are they in the same network, or across the internet?
>>
>> -[Unknown]
> 
> It will be:
> 1000*4=4000 bytes/sec (double=64 bit)
> As they are directly connected using network cards, this shouldn't be a 
> problem.
> Is it possible to send data at a rate of 1000samples/sec over a tcp 
> connection? (4 byte chunks :)
> 
> 



More information about the Digitalmars-d-learn mailing list