Implemented the setMaxSockets method.