简体   繁体   中英

(How) can I use ServerSocket to listen for UDP instead of TCP traffic?

In my application, there's a module that uses ServerSocket to listen for incoming TCP connections. When I switched a client to use UDP, I expected to receive data anyway, but I was wrong. When I looked at the documentation, however, I couldn't find any config option to set up the socket for UDP. Do I have to use a different class?

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