pass fd of socket to native routines instead of fd function itself
Merge pull request #1 from monsanto/fd-fix

pass fd of socket to native routines instead of fd function itself