*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
Author

C/S communication over FW&VPNease help

Yaroslav Chinskiy
Ranch Hand

Joined: Jan 09, 2001
Posts: 147
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: C/S communication over FW&VPNease help
 
Similar Threads
chat server
Connection is failing at ObjectInputStream for Server
Problems in isBound() and isClosed() methods in the Socket class
Independent Serwer to Client (!) communication
Server Side Socket Issue