i have made a client-server application using vb winsock control, and I realized that the packets I send to the cliend can arrive in different order and even not reach client''s port.
Because of my hurry I was forced to code a queue for output messages and a custom protocol to verify every packet is sent in order and that arrives safely to the client, If not after n seconds I do a resend of that message. I do validate on client side that I haven''t already recieved that message, I use msg-id number to identify them. Do I am a lammer at this? I''m using TCP-IP protocol, not UDP.
I post this, because if this is a common issue to winsock, it could be usefull, and if it isnt it could be usefull to take me as a bad example: "you shouldn''t do like xaxa did". Either way I could learn, so please FLAME ME AS WELL
Send data packets
Doesn''t TCP guarantee in-order receipt of messages? I read a protocol book on it once but haven''t had to implement it in software so I don''t know the answer personally.
Yes. The TCP protocol, as one of it''s requirements, is guaranteed packet delivery, and also guaranteed first-send-first-received packet order.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement