[Stream][Buffer] Only check feof on some occasions

If a TCP endpoint triggers a socket close handshake the other endpoint is still allowed to send data if the connection is open and should send a closing handshake asap.
feof detected the socket was closed for reading but told the write buffer is was closed entirely.
We can't seem to determine the difference in PHP so we're only checking if it's a generic_socket which seems to satisfy the requirements.