Win a copy of Head First Android this week in the Android forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

C/S communication over FW&VPNease help

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a server and multiple clients. The server generates messages and sends them to the subscribers. each client has multiple subscribers.
The system was simple at the begining. I was generating sub requests on the client side and forward them to the server. The server would group the requests by hostname and create distribution thread for each host. The thread would initiate connection to a fixed port and forward messages in real time.
since the ports are fixed i had no problems with FW but now i have to port the application to VPN.
The VPN is restricted so a server inside of the LAN can not initiate connection to the clients which are outside.
So i was trying to initiate the connection from the client and use the opened socket for my distributer threadv (ServerSocket.accept). but the problem is that I can not switch the local port of the socket that was returned by the server socket SO all of my client are connecting to the same port and all of my threads are trying to use the port to push messages
Do u know how to work around that problem?
How can i make client to open connection and my server threads to use the connection for the data transffer?
Thank you.
reply
    Bookmark Topic Watch Topic
  • New Topic