i'm currently studying network programming , i use comet as a reference as it's well documented
but i can't understand [Only registered and activated users can see links. Click Here To Register...]
here is my thoughts:
- client sends bytes for the first time => let's say 80 bytes (3 packets each 32bytes length, third one will be received completely on next loop)
- server on receive sets consumed = 0, examined = 80
- server decrypts bytes from 0 to 80
- server splits the bytes to 2 packets and sends them to a queue so now consumed = 64, examined = 80
my question is what will this snippet do? copying the unprocessed bytes to what ?
but i can't understand [Only registered and activated users can see links. Click Here To Register...]
here is my thoughts:
- client sends bytes for the first time => let's say 80 bytes (3 packets each 32bytes length, third one will be received completely on next loop)
- server on receive sets consumed = 0, examined = 80
- server decrypts bytes from 0 to 80
- server splits the bytes to 2 packets and sends them to a queue so now consumed = 64, examined = 80
my question is what will this snippet do? copying the unprocessed bytes to what ?
Code:
actor.Buffer.Slice(consumed, examined).CopyTo(actor.Buffer);