Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

how to work with socket

 
loveAnil Nayak
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question multiple times: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.
 
    Bookmark Topic Watch Topic
  • New Topic