Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
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
赵啸非
device-new-platform
Commits
8473ae0b
Commit
8473ae0b
authored
Jul 01, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物联网1.0
parent
e7d94d13
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
device-manager/src/main/java/com/mortals/xhx/daemon/netty/server/controlserver/handler/NettyUDPServerHandler.java
...y/server/controlserver/handler/NettyUDPServerHandler.java
+8
-8
device-manager/src/test/java/com/mortals/httpclient/UDPClientApp.java
...er/src/test/java/com/mortals/httpclient/UDPClientApp.java
+1
-1
device-manager/src/test/java/com/mortals/httpclient/UDPClientHandler.java
...rc/test/java/com/mortals/httpclient/UDPClientHandler.java
+1
-1
No files found.
device-manager/src/main/java/com/mortals/xhx/daemon/netty/server/controlserver/handler/NettyUDPServerHandler.java
View file @
8473ae0b
...
@@ -33,14 +33,14 @@ import static com.mortals.xhx.common.key.Constant.*;
...
@@ -33,14 +33,14 @@ import static com.mortals.xhx.common.key.Constant.*;
public
class
NettyUDPServerHandler
extends
SimpleChannelInboundHandler
<
DatagramPacket
>
{
public
class
NettyUDPServerHandler
extends
SimpleChannelInboundHandler
<
DatagramPacket
>
{
@Value
(
"${application.registerApiPath:/api/register}"
)
//
@Value("${application.registerApiPath:/api/register}")
private
String
registerApiPath
;
private
String
registerApiPath
=
"/api/register"
;
@Value
(
"${application.deviceInitApiPath:/api/deviceInit}"
)
//
@Value("${application.deviceInitApiPath:/api/deviceInit}")
private
String
deviceInitApiPath
;
private
String
deviceInitApiPath
=
"/api/deviceInit"
;
@Value
(
"${application.deviceUpdateApiPath:/api/deviceUpdate}"
)
//
@Value("${application.deviceUpdateApiPath:/api/deviceUpdate}")
private
String
deviceUpdateApiPath
;
private
String
deviceUpdateApiPath
=
"/api/deviceUpdate"
;
@Value
(
"${server.servlet.context-path:/m}"
)
//
@Value("${server.servlet.context-path:/m}")
private
String
servletPath
;
private
String
servletPath
=
"/m"
;
private
DeviceService
deviceService
;
private
DeviceService
deviceService
;
...
...
device-manager/src/test/java/com/mortals/httpclient/UDPClientApp.java
View file @
8473ae0b
...
@@ -52,7 +52,7 @@ public class UDPClientApp {
...
@@ -52,7 +52,7 @@ public class UDPClientApp {
}
}
});
});
try
{
try
{
Channel
channel
=
bootstrap
.
bind
(
7789
).
sync
().
channel
();
Channel
channel
=
bootstrap
.
bind
(
8074
).
sync
().
channel
();
channel
.
closeFuture
().
sync
().
await
();
channel
.
closeFuture
().
sync
().
await
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
device-manager/src/test/java/com/mortals/httpclient/UDPClientHandler.java
View file @
8473ae0b
...
@@ -34,7 +34,7 @@ public class UDPClientHandler extends SimpleChannelInboundHandler<DatagramPacket
...
@@ -34,7 +34,7 @@ public class UDPClientHandler extends SimpleChannelInboundHandler<DatagramPacket
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
log
.
info
(
"send msg:{}"
,
i
);
log
.
info
(
"send msg:{}"
,
i
);
ctx
.
writeAndFlush
(
new
DatagramPacket
(
Unpooled
.
copiedBuffer
(
"我在广播"
+
i
,
Charset
.
forName
(
"utf-8"
)),
ctx
.
writeAndFlush
(
new
DatagramPacket
(
Unpooled
.
copiedBuffer
(
"我在广播"
+
i
,
Charset
.
forName
(
"utf-8"
)),
new
InetSocketAddress
(
"192.168.0.
98"
,
7788
)));
new
InetSocketAddress
(
"192.168.0.
216"
,
8074
)));
try
{
try
{
TimeUnit
.
SECONDS
.
sleep
(
2
);
TimeUnit
.
SECONDS
.
sleep
(
2
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
...
...
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