#Way to check if a TCP connection is still open for reading without actually reading any bytes ?

2 messages · Page 1 of 1 (latest)

jolly sand
#

i don't think there is anyway, other than trying to read or write from it.
but you can set read/write deadline, so it won't block forever.

#

you can read/write 0 byte (make([]byte, 0)) and it should just send an empty tcp packet or frame.