program about scoket

本文探讨了在将TCP/IP客户端和服务器程序从VC6.0移植到VS2005过程中遇到的问题,特别是关于字符串读取停滞不前的情况。文中详细分析了可能的原因,并提供了修改VS2005配置来解决此问题的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

关于TCP/IP客户端和服务器的程序.
my code  can run ok in VC6.0,but when I replant it to VS2005,happen the question without rhyme or reason.It run in the position of Achieve::ReadString and stop for a long time.I analyse my code and at last doubt code format question.I do my best to solve it  but don't find any way.I busy in the whole day and don't solve it.finally,please google to help me.modify VS2005 code configuration,sustain UNICODE at default situation.let it sustain any format.I had solved this question but spent the whole day on the qestion.do you think it is a worthy thing?thank you!
use CSocket ,CSocketFile and CAchieve.
new CSocket object m_socket
m_socket->create();
m_socket-> connect(serverName,port);
new CSocketFile(m_socket) object m_socketFile
new CAchieve(m_socketFile,CAchieve::load);m_loadAchieve
new CAchieve(m_socketFile,CAchieve::store);m_storeAchieve
m_storeAchieve store the command and send it to the serve.clear m_storeAchieve.
m_loadAchieve get feedback from the server.

CAsyncSocket don't sustain SOCK_STREAM.SOCKET_STREAM is TCP and SOCK_DGRAM is UDP.
TCP send data to server and wait for server.if server give a true feedback and continne transforming data.else retransform.it is used if data transform very correctly.
UDP don't wait for the server.
I conside it also be the code format question. 
CAsyncSocket new object, create it and connect to the serve.rewrite OnReceive function and get the feedback message. 

use CFtpConnection and CInternetSession,我写过一个ftp上传进度控制。通过一个2M的共享空间控制

GetFtpDirectory  是验证你新创建的路径是否正确!

CFtpFileFind 之前需要确定ftp的路径,SetFtpDirectory

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值