在我写的Remoting程序中,偶尔的情况下会出现异常,异常消息为:无法立即完成一个非阻挡性套接字操作。
出现这个异常的几率不到10%
请问该怎么解决
服务器端。。
channel = new TcpServerChannel(8400); //注册通道
ChannelServices.RegisterChannel(channel, false);
channel.StartListening(null); //传递对象
RemotingConfiguration.RegisterWellKnownServiceType(typeof(LogRMI),
"LogRMI", WellKnownObjectMode.SingleCall);客户端...
m_logRMI = (LogRMI)Activator.GetObject(typeof(LogRMI), m_url + "LogRMI");谢谢。。
出现这个异常的几率不到10%
请问该怎么解决
服务器端。。
channel = new TcpServerChannel(8400); //注册通道
ChannelServices.RegisterChannel(channel, false);
channel.StartListening(null); //传递对象
RemotingConfiguration.RegisterWellKnownServiceType(typeof(LogRMI),
"LogRMI", WellKnownObjectMode.SingleCall);客户端...
m_logRMI = (LogRMI)Activator.GetObject(typeof(LogRMI), m_url + "LogRMI");谢谢。。
http://topic.csdn.net/t/20030522/23/1821674.html
这种错误最讨厌了
他这个帖子是解决直接使用Socket通信的
我用的是remoting,虽然也是封装了Socket的,但是我没有找到设置的地方。
所以我想要的是解决remoting的方案。
再次感谢。。
要解决这个问题要么设置个变量来表示是否完成调用,要么就用异步的remoting操作模式.
http://dev.csdn.net/article/84792.shtm