Detect https for sockets