An advanced Curl socket implementation with multithreading for Lithium