Initialise and shutdown Windows socket layer in sr_init/sr_exit.