I think with UDP you get can get packets in different order, not get them at 
all, get them repeated.. but as opposed to TCP you get entire packets, if 
you send 100 bytes at once, you get 100 at once. Someone correct me if I'm 
wrong..


>
> Hi,
>
> This is the first time I am writing a UDP server. The other UDP was a
> client. It was fairly straight forward.
>
> As the server lets say I have 2 clients, A and B, that will be sending me
> unsolicited data of 100 bytes per message.
>
> If I understand, when TWSocket.OnDataAvailable fires the data source can 
> be
> mixed.
>
> For example I could get 10 bytes from A, then 19 bytes from B, then 14 
> bytes
> from B and then 56 bytes from A, etc.
>
> And I might not get the hundred bytes. I might only get 45.
>
> This lead to keeping separate state machines for each client.
>
> With TCP I normally read the data to the client buffer and post a message 
> so
> that OnDataAvailable is as short as possible. In this case it appears I 
> need
> to read it to a buffer, determine the client, move the data to the clients
> buffer and post a message.
>
>
> Sound about right?
>
> Ciao,
>
> Mark
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to