This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes how to work with socket Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply locked New topic
Author

how to work with socket

loveAnil Nayak
Greenhorn

Joined: Dec 29, 2009
Posts: 3
actually i have two GUI programs

1.Client1
2.Client2

Client1 will send data Client2 will receive and vice versa.


i have used socket but when the socket object is created by
Socket client = new Socket(InetAddress.getLocalHost(),1581);

Socket server = new Socket(InetAddress.getLocalHost(),1581);

what happened that on program is running and other get closed automatically because one socket is not shared by two program simultaniously

how to use the socket or any other class so that both side communication will be possible

and another problem is

if client1 program is sending data to client2 program with out interfering to that program client1 how to display data in GUI of client1(textarea)


so how to do both side communication both will send both will receive
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
Please do not post the same question multiple times: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to work with socket
 
Similar Threads
executing a java program from web client
Updating the GUI Table
executing a java program from web client
servlet-applet
how to work with socket