Emitting eof event when there is no more to read on socket

I need to create a server which returns last message after the socked was shutdown and before was closed.
It is similar to, ie. FTP server which returns 500 error if the connection was not finished gracefuly:

```
$ nc ftp.debian.org 21 </dev/null
220 ftp.debian.org FTP server
500 OOPS: vsf_sysutil_recv_peek: no data
500 OOPS: priv_sock_get_cmd
```

My proposition is the new event `eof` called when `sysread` returns `0`.