How to use socket based client with WCF (net.tcp) service?

前端 未结 3 1958
后悔当初
后悔当初 2020-12-01 00:03

I have developed a WCF service that uses the net.tcp adapter and listens to a specific port. I want to connect to that service using a normal .net client that uses sockets t

3条回答
  •  感情败类
    2020-12-01 00:54

    The Net.TCP binding uses a custom wire-level framing format that is not really documented, though Nicholas Allen started a series of blog posts on the topic recently. The series start here: http://blogs.msdn.com/drnick/archive/2009/01/19/message-framing-part-1.aspx

    To be honest, Net.TCP is really, currently, more useful for WCF to WCF communication. if you want to interop with a custom TCP format that you need to handle, you're much better off either using raw sockets or creating your own custom WCF transport channel (which might not be trivial, btw)

提交回复
热议问题