在WCF net.tcp绑定上更改套接字选项 [英] Changing Socket Options on WCF net.tcp binding

查看:76
本文介绍了在WCF net.tcp绑定上更改套接字选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用net.tcp绑定并实现某些服务的.net 4.0 WCF应用程序。

我想为该绑定设置一个TCP套接字选项( ReuseAddress 选项。一个相关问题解释了为什么要这样做)。

如果我使用的是原始套接字,则可以使用 Socket.SetSocketOption 方法。

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.

是否可以通过某种方式从net.tcp绑定中提取底层的原始套接字以更改其选项?还是设置该选项的其他方法?

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?

推荐答案

阿米尔,谢谢您提出添加ReuseAddress选项的建议。但是,我们需要更好地了解您的具体情况。在相关的问题中(在WCF net.tcp绑定上更改套接字选项)上下文,是否启用端口共享?似乎移植共享可能会导致类似的症状。基本上,我们需要具体的repro程序和设置步骤来更好地理解问题。
如果仍然有人遇到问题或需要添加复用地址选项,请在 http带有repro程序和repro步骤的://connect.microsoft.com/VisualStudio 。谢谢。

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.

这篇关于在WCF net.tcp绑定上更改套接字选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆