3838#endif
3939
4040// Receive wait timeout (ms)
41- constexpr DWORD XNET_RECV_WAIT_TIMEOUT = 500 ;
41+ inline constexpr DWORD XNET_RECV_WAIT_TIMEOUT = 500 ;
4242
4343// Send wait timeout (ms)
44- constexpr DWORD XNET_SEND_WAIT_TIMEOUT = XNET_RECV_WAIT_TIMEOUT;
44+ inline constexpr DWORD XNET_SEND_WAIT_TIMEOUT = XNET_RECV_WAIT_TIMEOUT;
4545
4646// Mapped file parameters
4747
@@ -51,15 +51,15 @@ constexpr DWORD XNET_SEND_WAIT_TIMEOUT = XNET_RECV_WAIT_TIMEOUT;
5151
5252#define XPS_USEFUL_SPACE (p ) (XPS_MAPPED_PER_CLI(p) - sizeof (struct xps ))
5353
54- constexpr ULONG XPS_DEF_NUM_CLI = 10 ; // default clients per mapped file
55- constexpr ULONG XPS_DEF_PAGES_PER_CLI = 8 ; // default 1K pages space per client
54+ inline constexpr ULONG XPS_DEF_NUM_CLI = 10 ; // default clients per mapped file
55+ inline constexpr ULONG XPS_DEF_PAGES_PER_CLI = 8 ; // default 1K pages space per client
5656
57- constexpr ULONG XPS_MAX_NUM_CLI = 64 ; // max clients per mapped file
58- constexpr ULONG XPS_MAX_PAGES_PER_CLI = 16 ; // max 1K pages space per client
57+ inline constexpr ULONG XPS_MAX_NUM_CLI = 64 ; // max clients per mapped file
58+ inline constexpr ULONG XPS_MAX_PAGES_PER_CLI = 16 ; // max 1K pages space per client
5959
60- constexpr ULONG XNET_INVALID_MAP_NUM = 0xFFFFFFFF ;
60+ inline constexpr ULONG XNET_INVALID_MAP_NUM = 0xFFFFFFFF ;
6161
62- constexpr ULONG XNET_EVENT_SPACE = 100 ; // half of space (bytes) for event handling per connection
62+ inline constexpr ULONG XNET_EVENT_SPACE = 100 ; // half of space (bytes) for event handling per connection
6363
6464// Mapped file structure
6565
@@ -77,12 +77,12 @@ typedef struct xpm
7777
7878// Mapped structure flags
7979
80- constexpr USHORT XPMF_SERVER_SHUTDOWN = 1 ; // server has shut down
80+ inline constexpr USHORT XPMF_SERVER_SHUTDOWN = 1 ; // server has shut down
8181
8282// Mapped structure ids
8383
84- constexpr USHORT XPM_FREE = 0 ; // xpm structure is free for use
85- constexpr USHORT XPM_BUSY = 1 ; // xpm structure is in use
84+ inline constexpr USHORT XPM_FREE = 0 ; // xpm structure is free for use
85+ inline constexpr USHORT XPM_BUSY = 1 ; // xpm structure is in use
8686
8787// Comm channel structure - four per connection (client to server data,
8888// server to client data, client to server events, server to client events)
@@ -134,8 +134,8 @@ typedef struct xcc
134134
135135// XCC structure flags
136136
137- constexpr ULONG XCCF_SERVER_SHUTDOWN = 1 ; // server shutdown has been detected by client
138- constexpr ULONG XCCF_ASYNC = 2 ; // secondary XCC for events processing
137+ inline constexpr ULONG XCCF_SERVER_SHUTDOWN = 1 ; // server shutdown has been detected by client
138+ inline constexpr ULONG XCCF_ASYNC = 2 ; // secondary XCC for events processing
139139
140140
141141// This structure (xps) is mapped to the start of the allocated
@@ -154,17 +154,17 @@ typedef struct xps
154154
155155// XPS flags
156156
157- constexpr USHORT XPS_DISCONNECTED = 1 ;
157+ inline constexpr USHORT XPS_DISCONNECTED = 1 ;
158158
159159// xps_channel numbers
160160
161- constexpr int XPS_CHANNEL_C2S_DATA = 0 ; // 0 - client to server data
162- constexpr int XPS_CHANNEL_S2C_DATA = 1 ; // 1 - server to client data
163- constexpr int XPS_CHANNEL_C2S_EVENTS = 2 ; // 2 - client to server events
164- constexpr int XPS_CHANNEL_S2C_EVENTS = 3 ; // 3 - server to client events
161+ inline constexpr int XPS_CHANNEL_C2S_DATA = 0 ; // 0 - client to server data
162+ inline constexpr int XPS_CHANNEL_S2C_DATA = 1 ; // 1 - server to client data
163+ inline constexpr int XPS_CHANNEL_C2S_EVENTS = 2 ; // 2 - client to server events
164+ inline constexpr int XPS_CHANNEL_S2C_EVENTS = 3 ; // 3 - server to client events
165165
166- constexpr ULONG XPI_CLIENT_PROTOCOL_VERSION = 3 ;
167- constexpr ULONG XPI_SERVER_PROTOCOL_VERSION = 3 ;
166+ inline constexpr ULONG XPI_CLIENT_PROTOCOL_VERSION = 3 ;
167+ inline constexpr ULONG XPI_SERVER_PROTOCOL_VERSION = 3 ;
168168
169169// XNET_RESPONSE - server response on client connect request
170170
@@ -180,25 +180,25 @@ struct XNET_RESPONSE
180180
181181// XNET_CONNECT_RESPONZE_SIZE - amount of bytes server writes on connect response
182182
183- constexpr size_t XNET_CONNECT_RESPONZE_SIZE = sizeof (XNET_RESPONSE);
183+ inline constexpr size_t XNET_CONNECT_RESPONZE_SIZE = sizeof (XNET_RESPONSE);
184184
185185// Windows names used to identify various named objects
186186
187- constexpr const char * XNET_MAPPED_FILE_NAME = " %s_MAP_%" ULONGFORMAT" _%" ULONGFORMAT;
187+ inline constexpr const char * XNET_MAPPED_FILE_NAME = " %s_MAP_%" ULONGFORMAT" _%" ULONGFORMAT;
188188
189- constexpr const char * XNET_CONNECT_MAP = " %s_CONNECT_MAP" ;
190- constexpr const char * XNET_CONNECT_MUTEX = " %s_CONNECT_MUTEX" ;
191- constexpr const char * XNET_CONNECT_EVENT = " %s_CONNECT_EVENT" ;
192- constexpr const char * XNET_RESPONSE_EVENT = " %s_RESPONSE_EVENT" ;
189+ inline constexpr const char * XNET_CONNECT_MAP = " %s_CONNECT_MAP" ;
190+ inline constexpr const char * XNET_CONNECT_MUTEX = " %s_CONNECT_MUTEX" ;
191+ inline constexpr const char * XNET_CONNECT_EVENT = " %s_CONNECT_EVENT" ;
192+ inline constexpr const char * XNET_RESPONSE_EVENT = " %s_RESPONSE_EVENT" ;
193193
194- constexpr const char * XNET_E_C2S_DATA_CHAN_FILLED = " %s_E_C2S_DATA_FILLED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
195- constexpr const char * XNET_E_C2S_DATA_CHAN_EMPTED = " %s_E_C2S_DATA_EMPTED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
196- constexpr const char * XNET_E_S2C_DATA_CHAN_FILLED = " %s_E_S2C_DATA_FILLED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
197- constexpr const char * XNET_E_S2C_DATA_CHAN_EMPTED = " %s_E_S2C_DATA_EMPTED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
194+ inline constexpr const char * XNET_E_C2S_DATA_CHAN_FILLED = " %s_E_C2S_DATA_FILLED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
195+ inline constexpr const char * XNET_E_C2S_DATA_CHAN_EMPTED = " %s_E_C2S_DATA_EMPTED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
196+ inline constexpr const char * XNET_E_S2C_DATA_CHAN_FILLED = " %s_E_S2C_DATA_FILLED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
197+ inline constexpr const char * XNET_E_S2C_DATA_CHAN_EMPTED = " %s_E_S2C_DATA_EMPTED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
198198
199- constexpr const char * XNET_E_C2S_EVNT_CHAN_FILLED = " %s_E_C2S_EVNT_FILLED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
200- constexpr const char * XNET_E_C2S_EVNT_CHAN_EMPTED = " %s_E_C2S_EVNT_EMPTED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
201- constexpr const char * XNET_E_S2C_EVNT_CHAN_FILLED = " %s_E_S2C_EVNT_FILLED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
202- constexpr const char * XNET_E_S2C_EVNT_CHAN_EMPTED = " %s_E_S2C_EVNT_EMPTED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
199+ inline constexpr const char * XNET_E_C2S_EVNT_CHAN_FILLED = " %s_E_C2S_EVNT_FILLED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
200+ inline constexpr const char * XNET_E_C2S_EVNT_CHAN_EMPTED = " %s_E_C2S_EVNT_EMPTED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
201+ inline constexpr const char * XNET_E_S2C_EVNT_CHAN_FILLED = " %s_E_S2C_EVNT_FILLED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
202+ inline constexpr const char * XNET_E_S2C_EVNT_CHAN_EMPTED = " %s_E_S2C_EVNT_EMPTED_%" ULONGFORMAT" _%" ULONGFORMAT" _%" ULONGFORMAT;
203203
204204#endif // REMOTE_XNET_H
0 commit comments