Pass correct type to socket