• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with sockets :S

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well,i made an tic tac toe online app to see if i really understood sockets or not and it works fine,i tested it with pcs in my network.
then i wanted to use the client side code on any other pc outside my network while the server is running on my pc
so i port forwarded to my pc and tested it, it doesn't let the other player to connect, only the first player can connect,
i tried to let the first player connect with the ip address of the router and the other one connects from my pc using 127.0.0.1(localhost)
it works just for the first game, if the user choses to play again after the game ends it doesn't let the player (that uses ip address of the router to connect again).
i made sure that i close all sockets before window closes.
 
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please UseAMeaningfulSubjectLine. Did you close your ServerSocket? Why can't he reconnect? What happens then? Please TellTheDetails and without some code we're just guessing.
 
reply
    Bookmark Topic Watch Topic
  • New Topic