简体   繁体   中英

springboot socket communications

I've been trying to make my own gps tracker server using springboot. There is a standalone project called Traccar and they use their own methods to create connections but I can't integrate the.netty framework in springboot; specially for the different handlers methods.

For example if any user send by post method the command to use, my server would be capable to take that command and send to the gps connected by socket but here is my problem because any time a channel is open, the message to send convert in null from the POST method to the writeFlush().

Any one knows how to intercept the method to take the command and send to the socket?

With the Netty framework, you can create a controller that listens for POST requests in a Spring Boot application and sends the command to the GPS device via a socket connection.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM