Sidney Markowitz wrote: > I think it would be better to create the new socket with each message. If > old replies are arriving as they seem to, wouldn't it be more efficient to > not have a listener on the socket when they arrive?
I got confused when I reread this, so I thought I should clarify it. If the socket is not changed with each message, then a process sends out queries on a port with one message, then continues to send out queries on the same port in subsequent messages. The ID is incremented and the socket is changed when the ID wraps, so there are no collisions. However, packets still arrive in reply to queries sent for old messages. Until the ID wraps, the replies are received, the ID is not found in the pending list, and the packet is discarded. There is no collision problem, but processing may take a lot longer than if a new socket is created for each message causing the old replies to find no listener on their port. -- sidney
