| | |
multiple clients conect to UDP server
![]() |
•
•
Join Date: Nov 2008
Posts: 33
Reputation:
Solved Threads: 2
You need to code multi-thread in your UDP server side. I believe you google this you will find some good URLs.
In your UDP server:
You need:
Albert
In your UDP server:
You need:
java Syntax (Toggle Plain Text)
while(true) { ServerSocket servSock = new ServerSocket(8888, 5); Socket client = servSock.accept(); multiThread connection = new multiThread(client); Thread t = new Thread(connection); t.start(); } private multiThread implements Runnable { void run() { ............ ........... } }
Albert
Last edited by cscgal; Dec 15th, 2008 at 6:07 pm. Reason: Added code tags
•
•
Join Date: Dec 2008
Posts: 53
Reputation:
Solved Threads: 6
Erm.. of course that last example is TCP, not UDP...
@bachma7 -- if you're going to cross-post to multiple forums, please have the courtesy to tell people that that's what you're doing. In your previous post, I gave you some pointers and you mentioned you were getting an error and I asked if you could post some code and say precisely what the verbatim error message was and which line it was occurring on.
@bachma7 -- if you're going to cross-post to multiple forums, please have the courtesy to tell people that that's what you're doing. In your previous post, I gave you some pointers and you mentioned you were getting an error and I asked if you could post some code and say precisely what the verbatim error message was and which line it was occurring on.
![]() |
Other Threads in the Java Forum
- Previous Thread: Urgent Binary Search Tree
- Next Thread: Please help
| Thread Tools | Search this Thread |
account android api applet application array arrays automation awt bidirectional binary birt bluetooth busy_handler(null) chat class classes client code columns component database designadrawingapplicationusingjavajslider draw eclipse error errors eventlistener exception expand fractal game givemetehcodez graphics gui guidancer homework html ide image inetaddress inheritance integer intellij j2me java javamicroeditionuseofmotionsensor javaprojects jlabel jme jni jpanel jtextfield julia linux list loop map method methods midlethttpconnection mobile mobiledevelopmentcreatejar monitoring myaggfun netbeans newbie nullpointerexception open-source plazmic print problem program programming project property recursion ria scanner search server set smart sms smsspam sort sourcelabs splash sql sqlite static string subclass support swing testautomation threads tree webservices windows





