Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
9816f6ac
Commit
9816f6ac
authored
Feb 28, 2021
by
Pavel Vainerman
Committed by
Pavel Vainerman
May 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[uwebsocket]: setup uniset-queue parameters
parent
d156b285
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
UWebSocketGate.cc
extensions/UWebSocketGate/UWebSocketGate.cc
+11
-3
No files found.
extensions/UWebSocketGate/UWebSocketGate.cc
View file @
9816f6ac
...
...
@@ -66,9 +66,15 @@ UWebSocketGate::UWebSocketGate( uniset::ObjectId id, xmlNode* cnode, const strin
sigINT
.
set
<
UWebSocketGate
,
&
UWebSocketGate
::
onTerminate
>
(
this
);
iocheck
.
set
<
UWebSocketGate
,
&
UWebSocketGate
::
checkMessages
>
(
this
);
check_sec
=
(
float
)
conf
->
getArgPInt
(
"--"
+
prefix
+
"msg-check-time"
,
it
.
getProp
(
"msgCheckTime"
),
int
(
check_sec
*
1000.0
))
/
1000.0
;
int
sz
=
conf
->
getArgPInt
(
"--uniset-object-size-message-queue"
,
conf
->
getField
(
"SizeOfMessageQueue"
),
10000
);
if
(
sz
>
0
)
setMaxSizeOfMessageQueue
(
sz
);
#ifndef DISABLE_REST_API
wsHeartbeatTime_sec
=
(
float
)
conf
->
getArgPInt
(
"--"
+
prefix
+
"ws-heartbeat-time"
,
it
.
getProp
(
"wsPingTime"
),
wsHeartbeatTime_sec
)
/
1000.0
;
wsSendTime_sec
=
(
float
)
conf
->
getArgPInt
(
"--"
+
prefix
+
"ws-send-time"
,
it
.
getProp
(
"wsSendTime"
),
wsSendTime_sec
)
/
1000.0
;
wsHeartbeatTime_sec
=
(
float
)
conf
->
getArgPInt
(
"--"
+
prefix
+
"ws-heartbeat-time"
,
it
.
getProp
(
"wsPingTime"
),
int
(
wsHeartbeatTime_sec
*
1000
)
)
/
1000.0
;
wsSendTime_sec
=
(
float
)
conf
->
getArgPInt
(
"--"
+
prefix
+
"ws-send-time"
,
it
.
getProp
(
"wsSendTime"
),
int
(
wsSendTime_sec
*
1000.0
)
)
/
1000.0
;
wsMaxSend
=
conf
->
getArgPInt
(
"--"
+
prefix
+
"ws-max-send"
,
it
.
getProp
(
"wsMaxSend"
),
wsMaxSend
);
httpHost
=
conf
->
getArgParam
(
"--"
+
prefix
+
"httpserver-host"
,
"localhost"
);
...
...
@@ -257,7 +263,9 @@ std::shared_ptr<UWebSocketGate> UWebSocketGate::init_wsgate( int argc, const cha
void
UWebSocketGate
::
help_print
()
{
cout
<<
"Default: prefix='ws'"
<<
endl
;
cout
<<
"--prefix-name name - Имя. Для поиска настроечной секции в configure.xml"
<<
endl
;
cout
<<
"--prefix-name name - Имя. Для поиска настроечной секции в configure.xml"
<<
endl
;
cout
<<
"--uniset-object-size-message-queue num - Размер uniset-очереди сообщений"
<<
endl
;
cout
<<
"--prefix-msg-check-time msec - Период опроса uniset-очреди сообщений, для обработки новых сообщений. По умолчанию: 10 мсек"
<<
endl
;
cout
<<
"websockets: "
<<
endl
;
cout
<<
"--prefix-ws-max num - Максимальное количество websocket-ов"
<<
endl
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment