fixed type signature of recv/send to allow for sockets that allow both