OnixS C++ ICE Binary Order Entry Handler 1.1.1
API Documentation
Loading...
Searching...
No Matches
Defines.h
Go to the documentation of this file.
1/*
2* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3*
4* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5* and international copyright treaties.
6*
7* Access to and use of the software is governed by the terms of the applicable OnixS Software
8* Services Agreement (the Agreement) and Customer end user license agreements granting
9* a non-assignable, non-transferable and non-exclusive license to use the software
10* for it's own data processing purposes under the terms defined in the Agreement.
11*
12* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13* of this source code or associated reference material to any other location for further reproduction
14* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15*
16* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17* the terms of the Agreement is a violation of copyright law.
18*/
19#pragma once
20
21#include <OnixS/ICE/BOE/ABI.h>
22#include <OnixS/ICE/BOE/Tools.h>
23
24#include <vector>
25#include <string>
26#include <set>
27#include <memory>
28
29#if defined(_WIN32) // Windows platform.
30
31#if !defined(STRICT)
32#define STRICT
33#endif
34
35#include <winsock2.h>
36
37#endif
38
40
41typedef unsigned short Port;
42
44typedef unsigned char Byte;
45
47typedef std::vector<Byte> Bytes;
48
49#if defined (_WIN32)
51typedef SOCKET Handle;
52#else
54typedef int Handle;
55#endif
56
59 SocketOption() noexcept
60 : optname(0), optval(nullptr), optlen(0) {}
61
62 SocketOption(int optionName, const void* optionValue, int optionLength) noexcept
63 : optname(optionName), optval(optionValue), optlen(optionLength) {}
64
66 const void * optval;
67 int optlen;
68};
69
70typedef size_t CpuIndex;
71typedef std::set<CpuIndex> CpuIndexes;
72typedef std::pair<Port, Port> PortRange;
73
75typedef std::vector<SocketOption> SocketOptions;
76
78{
79 static constexpr int UndefinedPriorityAndPolicy = 255;
80};
81
#define ONIXS_ICEBOE_NAMESPACE_BEGIN
Definition ABI.h:94
#define ONIXS_ICEBOE_NAMESPACE_END
Definition ABI.h:98
unsigned short Port
Definition Defines.h:41
std::vector< SocketOption > SocketOptions
Socket options.
Definition Defines.h:75
size_t CpuIndex
Definition Defines.h:70
std::pair< Port, Port > PortRange
Definition Defines.h:72
int Handle
Type alias for socket handle.
Definition Defines.h:54
std::set< CpuIndex > CpuIndexes
Definition Defines.h:71
unsigned char Byte
Type alias for byte.
Definition Defines.h:44
std::vector< Byte > Bytes
Sequence of bytes.
Definition Defines.h:47
static constexpr int UndefinedPriorityAndPolicy
Definition Defines.h:79
SocketOption(int optionName, const void *optionValue, int optionLength) noexcept
Definition Defines.h:62