Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
telemersion
Telemersive Switchboard
Commits
ed15bd03
Commit
ed15bd03
authored
Apr 24, 2021
by
froehlich martin - mfroehli
Browse files
Update udp_one2manymo.py to sockets with resuable address
parent
b78ac0a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
proxies/udp_one2manymo.py
View file @
ed15bd03
...
...
@@ -25,12 +25,14 @@ class One2ManyMoProxy(multiprocessing.Process):
raise
ValueError
(
'Specified port "%s" is invalid.'
%
port
)
try
:
self
.
source
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_DGRAM
)
self
.
source
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_REUSEADDR
,
1
)
self
.
source
.
settimeout
(
0.1
)
self
.
source
.
bind
((
listen_address
,
listen_port
))
except
socket
.
error
as
msg
:
raise
try
:
self
.
sink
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_DGRAM
)
self
.
sink
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_REUSEADDR
,
1
)
# Make socket non-blocking by setting timeout to 0
self
.
sink
.
settimeout
(
0
)
self
.
sink
.
bind
((
listen_address
,
send_port
))
...
...
Write
Preview
Supports
Markdown
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