Can I make a TCP server with Tomket?

Asked 2 years ago, Updated 2 years ago, 82 views

Hi, everyone. In Eclipse, we implemented HTTP server with Java HTTP servlet. The client group is Android. I know Tomket is a web server I wonder if TCP server is also supported. Web socket? I heard it at first glance, but if I apply for this, can I implement it with this?

If not, should I transfer to Netty or node.js? Thank you.

tomcat

2022-09-22 21:38

1 Answers

It would be easier to answer if you could write down more specifically what the server you want (or what action you should be able to do).

HTTP is also a protocol that operates over TCP. However, due to the nature of the protocol, it is not suitable for server push (chat, etc.) because it is a construction that continues to create new connections.

If you can do anything with the typical TCP server you asked, you can almost implement it using Websocket.

Instead, because implementation is relatively complex, if you need real-time alarms, you can use SSE.

p.s: I'm not sure what the internal implementation looks like, but Tomkett also supports websockets in the new version.

Tomcat Websocket


2022-09-22 21:38

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.