support socket._fileobject in setfile