Solved

Sockets connection....

Posted on 1998-03-16
1
203 Views
Last Modified: 2010-04-16
Is it possible to open a socket connection and using that
open connection to connect to another server??
The problem is that there is a server  'A' that I need to connect to but I can only do so if I first connect to another server 'B' and to connect to server 'A' from there.
0
Comment
Question by:ABC031698
1 Comment
 
LVL 6

Accepted Solution

by:
jpk041897 earned 150 total points
Comment Utility
Generaly speaking, uou can set up a bridge using two sockets, but you cannot use the same socket to connect three boxes.

In practice, you could set up a packet switching network on server B, that redirects its input to A, but this implies spetial software, admin leve control over server B and is usualy either more expensive or more trouble than its worth.

A socket is a data stucture that contains information regarding an open connection betwwen to machines. As such it will contain information suc as port numner (SSMTP, FTP, etc), IP address of the desired connection (which is resoveld via DNS resolution from the URL), status, etc.

Contrary to first impretions though, a socket is not, in itself an active connection.

When you open a socket, you are requesting two computers to establish a connection via TCP, UDP or X.25 and to fill in the data structures. The connection itself though is handled by the TCP, UDP or X.25 stack (Winsock for example) and is written over a point to point architecture.

To sum up, if you are the admin, Super user or whatever for server B and can afford to set up server B as a packet swithing net without affecting other software, then you can solve your problem with minimal programming effort. If on the other hand you don't meet these requirenments then  you can set up a bridge as follows (a bridge is a read and forward mechanism).

Set up a listener on Server B, whenever a socket is opend, in B, it can open a client conection to Server A using another socket (it can use the same port, it just has to be a difrent data structure, aka socket). The server app in A can then have a listener that awaits data from B, execute whatever is required from it and then reverse the process back to the original client.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now