Yakumo
Yakumo

Reputation: 3

Can you miss packets, when socket is currently not receiving?

I got sockets that are listening to ICMP/UDP packets. If the socket receives a packet and the handling of this packet takes too long (code after socket.receive()), could following packets be missed, since I'm currently not at socket.receive() part?

Upvotes: 0

Views: 108

Answers (1)

David Schwartz
David Schwartz

Reputation: 182819

Strictly speaking, yes. The implementation is free to discard packets any place it wishes to. However, it would be a pretty poor implementation if it didn't provide some reasonable amount of buffering, and Linux does.

Upvotes: 1

Related Questions