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

前端 未结 1 1996
天命终不由人
天命终不由人 2020-12-19 00:51

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 d

1条回答
  •  时光说笑
    2020-12-19 01:03

    Use DatagramSocket. For a tutorial, look here http://download.oracle.com/javase/tutorial/networking/datagrams/index.html

    0 讨论(0)
提交回复
热议问题