Changing Socket Options on WCF net.tcp binding

瘦欲@ 提交于 2019-12-06 17:43:02

问题


I have a .net 4.0 WCF application that uses the net.tcp binding and implements some service.
I would like to set a TCP socket option for that binding (ReuseAddress option. A related question explains why I want to do that).
If I was working with Raw Sockets I could use the Socket.SetSocketOption Method.

Is there a way to somehow extract the underlying Raw Socket from the net.tcp binding in order to change its options? Or some other way to set this option?


回答1:


Amir, Thank you for your suggestion of adding ReuseAddress option. However, we need understand better what was your concrete scenario. In the related question (Changing Socket Options on WCF net.tcp binding) context, have you enable port sharing? Seems like porting sharing could result with similar symptom. Basically, we need concrete repro program and setup steps to understand better of the problem. If anyone still runs into the problem or see the need of adding reuseAddress option, please report the bug at http://connect.microsoft.com/VisualStudio with repro program and repro steps. Thank you.



来源:https://stackoverflow.com/questions/12371768/changing-socket-options-on-wcf-net-tcp-binding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!