File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes C/S communication over FW&VPNease help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "C/S communication over FW&VPNease help " Watch "C/S communication over FW&VPNease help " New topic

C/S communication over FW&VPNease help

Yaroslav Chinskiy
Ranch Hand

Joined: Jan 09, 2001
Posts: 147
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.
I agree. Here's the link:
subject: C/S communication over FW&VPNease help
It's not a secret anymore!