Is multi-threading possible in a simple java server using udp connectionless protocol? give an example!!
Is multi-threading possible in a simple java server using udp connectionless protocol? give an
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Multi-threading is actually simpler with UDP because you don’t have to worry about connection state. Here is the listen loop from my server,
The threadPool is a ThreaPoolExecutor. Due to the short-lived nature of UDP sessions, thread pool is required to avoid the overhead of repeatedly thread creation.