53 lines
2.0 KiB
C++
53 lines
2.0 KiB
C++
/*
|
|
* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
|
|
*
|
|
* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
|
|
* and international copyright treaties.
|
|
*
|
|
* Access to and use of the software is governed by the terms of the applicable OnixS Software
|
|
* Services Agreement (the Agreement) and Customer end user license agreements granting
|
|
* a non-assignable, non-transferable and non-exclusive license to use the software
|
|
* for it's own data processing purposes under the terms defined in the Agreement.
|
|
*
|
|
* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
|
|
* of this source code or associated reference material to any other location for further reproduction
|
|
* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
|
|
*
|
|
* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
|
|
* the terms of the Agreement is a violation of copyright law.
|
|
*/
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <OnixS/FIXEngine/ABI.h>
|
|
|
|
namespace OnixS {
|
|
namespace FIX {
|
|
|
|
/// The way in which the Engine will work with sockets.
|
|
struct ThreadingModel {
|
|
enum Enum {
|
|
/// By default, the session will use the mode that was configured for the whole Engine.
|
|
Default,
|
|
|
|
/// The session will use its own sending and receiving threads.
|
|
DedicatedThreads = 3,
|
|
|
|
/// The session will share the thread pool.
|
|
ThreadPool = 4,
|
|
|
|
/// Session events are handled by rolling an event loop in a user thread.
|
|
ExternalThread = 5,
|
|
};
|
|
|
|
/// Returns a textual representation of the ThreadingModel::Enum value.
|
|
ONIXS_FIXENGINE_API static const char * toString(ThreadingModel::Enum value);
|
|
|
|
/// Parses the ThreadingModel::Enum value from the textual representation.
|
|
ONIXS_FIXENGINE_API static Enum parse(const std::string & fromText);
|
|
};
|
|
|
|
}
|
|
} // namespace FIX, OnixS
|