Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-Erm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-Erm
Commits
d90cec4a
Commit
d90cec4a
authored
Apr 12, 2021
by
Suzhi Bi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
42efce26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
code/begin_0.py
code/begin_0.py
+22
-0
No files found.
code/begin_0.py
0 → 100644
View file @
d90cec4a
import
socket
import
sys
def
sender
(
ip
,
port
):
try
:
s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
s
.
connect
((
ip
,
port
))
except
socket
.
error
as
msg
:
print
(
msg
)
sys
.
exit
(
1
)
message
=
'begin'
s
.
send
(
message
.
encode
(
'utf-8'
))
s
.
close
()
destination_ip
=
[
'192.168.191.5'
,
'192.168.191.6'
,
'192.168.191.7'
,
'192.168.191.8'
]
port
=
[
8081
,
8082
,
8083
,
8084
]
print
(
"Start"
)
for
i
in
range
(
len
(
destination_ip
)):
sender
(
destination_ip
[
i
],
port
[
i
])
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