• Post Reply Bookmark Topic Watch Topic
  • New Topic

peer to peer  RSS feed

 
conor murphy
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i am trying to write a peer to peer chat program. i have created a server client program that works fine but when it comes to the peer to peer program i am have a problem. i cannot find a way to connect the two clients together without having to make one use a ServerSocket so that the other one can connect to it. is there a way to just have each client with a Socket and have them connect that way or do i need to make one use a ServerSocket?

thanks
 
Henry Wong
author
Sheriff
Posts: 22861
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One has to listen on the socket, before the other can connect to it... So... yes, one needs to start with a server socket, even in a peer to peer setup.

Henry
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!