adjust types to match functions elide non-portable casts cast to proper types
but sockets instead, internally. Old, backward compatible interfaces maintained.