Coder Social home page Coder Social logo

win32_block_uploadfile's Introduction

========================================================================
    使用帮助文档
========================================================================

1.定义一个UploadFile对象
2.使用CreateSendFile这个工厂方法返回ISendFileInterface*类型对象
3.你可以直接定义一个ISendFileInterface*指针来接收该返回值,通过多态实现功能;也可以定义一个CFileClient*来接收该返回值
4.ISendFileInterface接口中函数注释
  4.1 ChoseFile函数
  返回值:出错返回0,正常返回文件大小
  参数1:文件名
  参数2:自己命名的文件类型

  4.2 Connect函数
  返回值:返回连接状态,true/false
  参数1:指定对端的地址。
  参数2:端口

  4.3 SendFile函数
  返回值:0-发送完成,-1出错
  参数:PTransInfo,记录文件上传状态,其中PTransInfo定义如下
  typedef struct {
	unsigned int	uploaded;	//已经上传的字节数
	bool			finished;	//上传是否完成
}TransInfo,*PTransInfo;
5.传输完成后,使用DeleteSendFile删除创建的ISendFileInterface*对象

win32_block_uploadfile's People

Contributors

unix8net avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.