Socket server library structure remake