For some reason, our program chooses BLOCKING mode for tcp socket, I known it's a bad design, but I can't make too many modifications now.
The problem is, when peer is powered down, recv call in our program will hang, is there any workaround? Does SO_KEEPALIVE option help or should I have to implement some heart-beat machanism?
Thanks.