Support max_sockets when creating context