LIB: init sockets.