• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is there a way to "bridge" TCP/IP sockets?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a way to "bridge" TCP/IP sockets?


  • Subject: Re: Is there a way to "bridge" TCP/IP sockets?
  • From: Frederick Cheung <email@hidden>
  • Date: Tue, 23 Nov 2010 18:55:11 +0000

On 23 Nov 2010, at 18:30, Jonathon Kuo wrote:

> On Nov 23, 2010, at 4:38 AM, Quinn The Eskimo! wrote:
>>
>> On 23 Nov 2010, at 00:16, Jonathon Kuo wrote:
>>
>>> I have a main process waiting for connections on a known port. Client A connects on new socket 10, and client B connects on new socket 11. If client A wants to interact with client B, is there a way to "bridge" the sockets together so the main process doesn't have to juggle the reads and writes between the two clients?
>>
>> There's no direct way to do this.  You'd have to write code (either async, threaded, or using libdispatch) to route the data between the sockets [1].
>
> Interesting, so my main process must act as a 'bucket brigade' go-between, reading from client A and writing to client B, etc. Does this paradigm scale? How many sockets/connections can the main process support before it runs into some sort of resource limit?
>
Well seems to work for stuff like haproxy which will happily proxy 1000s of http connections  per second.

Fred

> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Macnetworkprog mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Is there a way to "bridge" TCP/IP sockets?
      • From: Jonathon Kuo <email@hidden>
References: 
 >Is there a way to "bridge" TCP/IP sockets? (From: Jonathon Kuo <email@hidden>)
 >Re: Is there a way to "bridge" TCP/IP sockets? (From: "Quinn \"The Eskimo!\"" <email@hidden>)
 >Re: Is there a way to "bridge" TCP/IP sockets? (From: Jonathon Kuo <email@hidden>)

  • Prev by Date: Re: Is there a way to "bridge" TCP/IP sockets?
  • Next by Date: Re: Is there a way to "bridge" TCP/IP sockets?
  • Previous by thread: Re: Is there a way to "bridge" TCP/IP sockets?
  • Next by thread: Re: Is there a way to "bridge" TCP/IP sockets?
  • Index(es):
    • Date
    • Thread