Multithreaded persistent socket server