Bridging two sockets
Posted
by
Itehnological
on Super User
See other posts from Super User
or by Itehnological
Published on 2012-09-18T15:40:42Z
Indexed on
2012/09/19
9:42 UTC
Read the original article
Hit count: 270
I wondered if it is possible to bridge two incoming tcp sockets.
For example:
Client A -----> Server <----- Client B
The the server sends it's magic to both clients and then they connect to each other bypassing the server
Server
Client A ----------><---------- Client B
UPDATE:
The idea is when those clients can't bind to ports to listen to still be able to create connection between each other with the help of the server.
For example Client A and Client B have tcp sockets with the server. User A decides to chat with User B and creates a new tcp connection with the server with the request to bridge it with User B. The server sends that request to Client B and it also opens up a new tcp connection with the server for that chat line.
Now when the server has both chat connections from A and B it bridges them and they can work without the server, and as a result the server won't have to process all the messages and files the two users share. That's the idea/
© Super User or respective owner