Watcher should not be limited to net.Conn, file descriptor maybe better
shizhx opened this issue · comments
I love Linux, everything is fd
in Linux, so I can watch network connection
, file
, event fd
, timer fd
, signal fd
etc. in one epoll/select
loop.
I am designing a proxy program which transporting data between network connection and tun device, it is a simple feature in C language, but I cannot find a good golang framework to do it. evio
and gnet
are only focus on server side, gaio
is the best match one.
But gaio.Watcher
only allow net.Conn
parameter(I know golang can wrap os.File
with net.Conn
), how about event fd
, timer fd
and signal fd
?
good idea