Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioc_sixiang_license
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zengtianlai3
ioc_sixiang_license
Commits
a9ae6dc8
Commit
a9ae6dc8
authored
Nov 15, 2022
by
AfirSraftGarrier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
格式并加些打印
parent
d65b2baa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
DeviceControllerTest.java
.../iot/sixiang/license/controller/DeviceControllerTest.java
+19
-5
No files found.
license/src/test/java/iot/sixiang/license/controller/DeviceControllerTest.java
View file @
a9ae6dc8
...
...
@@ -33,19 +33,33 @@ public class DeviceControllerTest {
System
.
out
.
println
(
bytes2Hex
(
allBytes
));
}
@SneakyThrows
@Test
void
s
ocket
()
{
void
testS
ocket
()
{
String
serverIp
=
"112.74.57.111"
;
int
serverPort
=
18889
;
String
appId
=
"ebsh71dp5t1ck948l5"
;
String
sn
=
"ERE54S619LNYMPKVN9"
;
String
appKey
=
"110801"
;
socket
(
serverIp
,
serverPort
,
appId
,
sn
,
appKey
);
}
@Test
void
yxSocket
()
{
String
serverIp
=
"14.116.221.61"
;
int
serverPort
=
18889
;
String
appId
=
"mny3i9pgg0xxs520qf"
;
String
sn
=
"IU23404BR1CQJOC63Q"
;
String
appKey
=
"20221114"
;
socket
(
serverIp
,
serverPort
,
appId
,
sn
,
appKey
);
}
@SneakyThrows
void
socket
(
String
serverIp
,
int
serverPort
,
String
appId
,
String
sn
,
String
appKey
)
{
Socket
socket
=
new
Socket
(
serverIp
,
serverPort
);
socket
.
setKeepAlive
(
true
);
System
.
out
.
println
(
"connect success..."
);
// 事先组装好要发送的鉴权信息
String
appId
=
"ebsh71dp5t1ck948l5"
;
String
sn
=
"ERE54S619LNYMPKVN9"
;
String
appKey
=
"110801"
;
byte
[]
authSendBytes
=
getAuthSendBytes
(
appId
,
sn
,
appKey
);
...
...
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