• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Connect to self the long way

 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a client that opens a Server Socket and leaves it open all day. At some point, another machine can open a connection and send some messages. Some users have firewalls that prevent this from working. I'd like to detect this at client login, and I'm thinking I'd like the client to connect to itself. Probably a dummy question: Is there a syntax for my local port that forces a connect to it to go out through the network and back? Thanks!!
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nope, don't believe so.

Why not just have the server try to connect to the client as soon as the client connects to it?
 
Stan James
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's high on my list right now because I haven't gotten into the books to look at how the client can call itself through the firewall. The normal use of this thing is async - one client broadcasts a message through the server to a subset of other clients matching some grouping criteria. Using the server to contact the client and report the results would be synchronous. That's not a problem even though it takes 30 or 60 seconds to fail, but it would be a new service. We also get some concern about bandwidth needs at logon from an offshore site. If it's the only way to do it, then so it goes.
 
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic