Deciding on a protocol and socket type