implementation for writefds
Merge pull request #857 from caiiiycuk/writefds

draft implementation for writefds