This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Server and two clients Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Server and two clients" Watch "Server and two clients" New topic
Author

Server and two clients

Kamal Chopra
Greenhorn

Joined: Jul 30, 2013
Posts: 19
Hi Coders!!!
I am connecting multiple servers (two) to a single server using UDP .
Server:


Client1:

Client2:

I am specifying same port numbers and other arguments vary except host address but at the end of the day no output appears ...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41144
    
  45
Have you gotten this client/server pair to work? If not, that's what I recommend you start with.


Ping & DNS - my free Android networking tools app
Kamal Chopra
Greenhorn

Joined: Jul 30, 2013
Posts: 19
Ulf Dittmer wrote:Have you gotten this client/server pair to work? If not, that's what I recommend you start with.

Well, i did implement the single client/server interaction but am implementing it using two clients is my first experience...Any guidance will be appreciated.
Kamal
Kamal Chopra
Greenhorn

Joined: Jul 30, 2013
Posts: 19
Kamal Chopra wrote:
Ulf Dittmer wrote:Have you gotten this client/server pair to work? If not, that's what I recommend you start with.

Well, i did implement the single client/server interaction but am implementing it using two clients is my first experience...Any guidance will be appreciated.
Kamal


here is my server part:



Client:


Output:
Blank(nothing).
Whats wrong here???
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41144
    
  45
Your server's main method doesn't do anything. Somehow you deleted the line where it actually starts the server.
Kamal Chopra
Greenhorn

Joined: Jul 30, 2013
Posts: 19
Ulf Dittmer wrote:Your server's main method doesn't do anything. Somehow you deleted the line where it actually starts the server.


Will You Please mention/rectify for me the Particular Statement(s)?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41144
    
  45
No need to - the correct main method is part of the articles.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Server and two clients
 
Similar Threads
Simple problem in running a Server class
Communicate 2 android in 2 emulator
Voice echo in UDP based voice transmission
java ping problem
Threading and collections problem.Pl help