Socket server improved