简体   繁体   中英

Using WCF over externally managed TCP sockets

Today we are using WCF's NetTcpBinding to communicate between peers in our system. The communication is bidirectional: each peer has channels opened against the other peers.

We are now looking into extending our architecture and introduce two "types" of peers: "public" peers are accessible over the public Internet, while "internal" peers are behind NAT. The impact of this is that an internal peer can establish TCP connections to a public peer, but the reverse is impossible. Therefore, public peers can no longer establish connections to internal peers.

Since TCP connections are symmetric (once established), my plan was to have the internal peer establish all the required TCP sockets against the public peer, and then have the public peer use some of these sockets to establish channels to the internal peer. However, when using NetTcpBinding, WCF manages the TCP sockets for me.

Will I have to write a new transport to implement this behavior, or is there an alternative way?

尝试研究SSH转发。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM