Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dm_task
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaoying Pu
dm_task
Commits
ebdae5e9
Commit
ebdae5e9
authored
Oct 21, 2015
by
Xiaoying Pu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the test main needed setup()
parent
2b07f82b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
src/main/TestUDPController.java
src/main/TestUDPController.java
+1
-0
udp.py
udp.py
+7
-6
No files found.
src/main/TestUDPController.java
View file @
ebdae5e9
...
...
@@ -17,6 +17,7 @@ public class TestUDPController {
public
static
void
main
(
String
[]
args
)
{
UDPController
cntrl
=
new
UDPController
();
cntrl
.
setUp
();
for
(
int
i
=
0
;
i
<
util
.
UDPConstants
.
TrialSet
.
length
;
i
++)
{
cntrl
.
sendTrialAndRecvResponse
(
i
);
}
...
...
udp.py
View file @
ebdae5e9
import
socket
UDP_IP
=
"127.0.0.1"
UDP_PORT
=
9
001
UDP_PORT
=
9
223
MESSAGE
=
"123,1,START"
sd
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_DGRAM
)
socket
.
bind
((
UDP_IP
,
UDP_PORT
))
while
True
:
data
,
addr
=
sd
.
recvfrom
(
1024
)
print
(
"recv: "
,
data
)
\ No newline at end of file
sd
.
sendto
(
MESSAGE
,
(
UDP_IP
,
UDP_PORT
))
#sd.bind((UDP_IP, UDP_PORT))
#while True:
# data, addr = sd.recvfrom(1024)
# print("recv: ", data)
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