MFC错误代码0000274d进入客户端服务器通信 [英] MFC error code 0000274d getting in client server commumnication

查看:79
本文介绍了MFC错误代码0000274d进入客户端服务器通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,

我已经使用CAsyncSocket类创建了一个客户端服务器应用程序.
我在客户端连接上收到错误代码0000274d.
谁能帮助我.当前只有单个客户端正在连接到服务器.

在此先谢谢您. 80).aspx> MSDN [ ^ ]返回代码:

 //  
//  MessageId:WSAECONNREFUSED 
//  
//  MessageText:
//  
// 由于目标计算机主动拒绝连接,因此无法建立连接.
//  
#define WSAECONNREFUSED 10061L  



MSDN:此功能通常由一次可能有多个连接请求的服务器(或想要接受连接的任何应用程序)使用:如果一个连接请求在队列已满的情况下到达,则客户端将收到一条错误消息,提示:指示为WSAECONNREFUSED."


aamswe说:
问题出在客户端上的套接字创建中.现在客户端正在连接到服务器.但是服务器没有从客户端接收消息.我有Voerriden OnAccept和OnReceive函数,当我从客户端发送消息时,捕获了OnAccept事件,但在OnRecive中没有发生.甚至我也尝试在OnAccept事件上接收消息,但接收到零字节.
可能是什么问题?

如果您正在运行Windows Vista/7,请打开ResMon.exe并转到网络页面.检查是否有与您的程序关联的会话或数据发送/接收.

如果您使用的是Vista之前的Windows版本,或者感觉很喜欢,请获取 Wireshark [ 解决方案

Look at MSDN[^] for return codes:

//
// MessageId: WSAECONNREFUSED
//
// MessageText:
//
// No connection could be made because the target machine actively refused it.
//
#define WSAECONNREFUSED                  10061L



MSDN: "This function is typically used by servers (or any application that wants to accept connections) that could have more than one connection request at a time: if a connection request arrives with the queue full, the client will receive an error with an indication of WSAECONNREFUSED."


aamswe says:
problem was in socket creation on client side. now client is connecting to the server. But server is not receving messages from client. I have voerriden OnAccept and OnReceive functions, When I am sending message from client, OnAccept event is captured but it''s not going in OnRecive. Even I tried to receive message on OnAccept event but zero byte recived.
What could be the problem?

If you are running Windows Vista/7 open ResMon.exe and go to the network page. Check to see if there is any sessions or data send/receive associated with your program.

If you are using a version of Windows previous to Vista, or you feel like it, get Wireshark[^] and start sniffing to see what is sent to/from the server.


这篇关于MFC错误代码0000274d进入客户端服务器通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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