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
2a40c0e2
Commit
2a40c0e2
authored
Nov 29, 2020
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(unet): remove unused parameter
parent
ed6dc389
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
56 deletions
+49
-56
UNetExchange.cc
extensions/UNetUDP/UNetExchange.cc
+0
-0
UNetReceiver.cc
extensions/UNetUDP/UNetReceiver.cc
+49
-56
UNetReceiver.h
extensions/UNetUDP/UNetReceiver.h
+0
-0
No files found.
extensions/UNetUDP/UNetExchange.cc
View file @
2a40c0e2
This diff is collapsed.
Click to expand it.
extensions/UNetUDP/UNetReceiver.cc
View file @
2a40c0e2
...
@@ -42,30 +42,29 @@ bool UNetReceiver::PacketCompare::operator()(const UniSetUDP::UDPMessage& lhs,
...
@@ -42,30 +42,29 @@ bool UNetReceiver::PacketCompare::operator()(const UniSetUDP::UDPMessage& lhs,
*/
*/
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
UNetReceiver
::
UNetReceiver
(
const
std
::
string
&
s_host
,
int
_port
UNetReceiver
::
UNetReceiver
(
const
std
::
string
&
s_host
,
int
_port
,
const
std
::
shared_ptr
<
SMInterface
>&
smi
,
const
std
::
shared_ptr
<
SMInterface
>&
smi
,
bool
nocheckConnection
,
bool
nocheckConnection
,
const
std
::
string
&
prefix
)
:
,
const
std
::
string
&
prefix
)
:
shm
(
smi
),
shm
(
smi
),
recvpause
(
10
),
updatepause
(
100
),
updatepause
(
100
),
port
(
_port
),
port
(
_port
),
saddr
(
s_host
,
_port
),
saddr
(
s_host
,
_port
),
recvTimeout
(
5000
),
recvTimeout
(
5000
),
prepareTime
(
2000
),
prepareTime
(
2000
),
lostTimeout
(
200
),
/* 2*updatepause */
lostTimeout
(
200
),
/* 2*updatepause */
lostPackets
(
0
),
lostPackets
(
0
),
sidRespond
(
uniset
::
DefaultObjectId
),
sidRespond
(
uniset
::
DefaultObjectId
),
respondInvert
(
false
),
respondInvert
(
false
),
sidLostPackets
(
uniset
::
DefaultObjectId
),
sidLostPackets
(
uniset
::
DefaultObjectId
),
activated
(
false
),
activated
(
false
),
pnum
(
0
),
pnum
(
0
),
maxDifferens
(
20
),
maxDifferens
(
20
),
waitClean
(
false
),
waitClean
(
false
),
rnum
(
0
),
rnum
(
0
),
maxProcessingCount
(
100
),
maxProcessingCount
(
100
),
lockUpdate
(
false
),
lockUpdate
(
false
),
d_cache_init_ok
(
false
),
d_cache_init_ok
(
false
),
a_cache_init_ok
(
false
)
a_cache_init_ok
(
false
)
{
{
{
{
ostringstream
s
;
ostringstream
s
;
...
@@ -125,11 +124,6 @@ void UNetReceiver::setLostTimeout( timeout_t msec ) noexcept
...
@@ -125,11 +124,6 @@ void UNetReceiver::setLostTimeout( timeout_t msec ) noexcept
ptLostTimeout
.
setTiming
(
msec
);
ptLostTimeout
.
setTiming
(
msec
);
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void
UNetReceiver
::
setReceivePause
(
timeout_t
msec
)
noexcept
{
recvpause
=
msec
;
}
// -----------------------------------------------------------------------------
void
UNetReceiver
::
setUpdatePause
(
timeout_t
msec
)
noexcept
void
UNetReceiver
::
setUpdatePause
(
timeout_t
msec
)
noexcept
{
{
updatepause
=
msec
;
updatepause
=
msec
;
...
@@ -983,33 +977,32 @@ void UNetReceiver::setUpdateStrategy( UNetReceiver::UpdateStrategy set )
...
@@ -983,33 +977,32 @@ void UNetReceiver::setUpdateStrategy( UNetReceiver::UpdateStrategy set )
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
const
std
::
string
UNetReceiver
::
getShortInfo
()
const
noexcept
const
std
::
string
UNetReceiver
::
getShortInfo
()
const
noexcept
{
{
// warning: будет вызываться из другого потока
// warning: будет вызываться из другого потока
// (считаем что чтение безопасно)
// (считаем что чтение безопасно)
ostringstream
s
;
ostringstream
s
;
s
<<
setw
(
15
)
<<
std
::
right
<<
getAddress
()
<<
":"
<<
std
::
left
<<
setw
(
6
)
<<
getPort
()
s
<<
setw
(
15
)
<<
std
::
right
<<
getAddress
()
<<
":"
<<
std
::
left
<<
setw
(
6
)
<<
getPort
()
<<
"[ "
<<
setw
(
7
)
<<
(
isLockUpdate
()
?
"PASSIVE"
:
"ACTIVE"
)
<<
" ]"
<<
"[ "
<<
setw
(
7
)
<<
(
isLockUpdate
()
?
"PASSIVE"
:
"ACTIVE"
)
<<
" ]"
<<
" recvOK="
<<
isRecvOK
()
<<
" recvOK="
<<
isRecvOK
()
<<
" receivepack="
<<
rnum
<<
" receivepack="
<<
rnum
<<
" lostPackets="
<<
setw
(
6
)
<<
getLostPacketsNum
()
<<
" lostPackets="
<<
setw
(
6
)
<<
getLostPacketsNum
()
<<
" updateStrategy="
<<
to_string
(
upStrategy
)
<<
" updateStrategy="
<<
to_string
(
upStrategy
)
<<
endl
<<
endl
<<
"
\t
["
<<
"
\t
["
<<
" recvTimeout="
<<
setw
(
6
)
<<
recvTimeout
<<
" recvTimeout="
<<
setw
(
6
)
<<
recvTimeout
<<
" prepareTime="
<<
setw
(
6
)
<<
prepareTime
<<
" prepareTime="
<<
setw
(
6
)
<<
prepareTime
<<
" evrunTimeout="
<<
setw
(
6
)
<<
evrunTimeout
<<
" evrunTimeout="
<<
setw
(
6
)
<<
evrunTimeout
<<
" lostTimeout="
<<
setw
(
6
)
<<
lostTimeout
<<
" lostTimeout="
<<
setw
(
6
)
<<
lostTimeout
<<
" recvpause="
<<
setw
(
6
)
<<
recvpause
<<
" updatepause="
<<
setw
(
6
)
<<
updatepause
<<
" updatepause="
<<
setw
(
6
)
<<
updatepause
<<
" maxDifferens="
<<
setw
(
6
)
<<
maxDifferens
<<
" maxDifferens="
<<
setw
(
6
)
<<
maxDifferens
<<
" maxProcessingCount="
<<
setw
(
6
)
<<
maxProcessingCount
<<
" maxProcessingCount="
<<
setw
(
6
)
<<
maxProcessingCount
<<
" waitClean="
<<
waitClean
<<
" waitClean="
<<
waitClean
<<
" ]"
<<
" ]"
<<
endl
<<
endl
<<
"
\t
[ qsize="
<<
qpack
.
size
()
<<
" recv="
<<
statRecvPerSec
<<
" update="
<<
statUpPerSec
<<
" per sec ]"
;
<<
"
\t
[ qsize="
<<
qpack
.
size
()
<<
" recv="
<<
statRecvPerSec
<<
" update="
<<
statUpPerSec
<<
" per sec ]"
;
return
s
.
str
();
return
s
.
str
();
}
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
UNetReceiver
::
pack_guard
::
pack_guard
(
mutex
&
_m
,
UNetReceiver
::
UpdateStrategy
_s
)
:
UNetReceiver
::
pack_guard
::
pack_guard
(
mutex
&
_m
,
UNetReceiver
::
UpdateStrategy
_s
)
:
...
...
extensions/UNetUDP/UNetReceiver.h
View file @
2a40c0e2
This diff is collapsed.
Click to expand it.
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