GithubHelp home page GithubHelp logo

filetrans's Introduction

FileTrans

安卓和iOS文件互传

通过网络服务发现 NSD 和 Websocket 实现安卓和 iOS 设备间文件传输。

服务端:

  • 创建 ServerSocket 开启 socket 服务,获取端口号;
  • 通过 NSD_SERVICE 注册nsd服务,在 NsdServiceInfo 设置双端定义的服务名称和类型,设置 socket 端口号;
  • 客户端连接后,发送包含文件信息的消息头和文件流;
  • 支持解析客户端发送的消息头和文件流,并将文件保存到本地。

客户端:

  • 在同一网络环境下,通过 NsdManager 发现nsd服务,解析得到 socket 服务器的ip地址和端口号;
  • 通过ip和端口连接到 socket 服务器;
  • 解析服务端发送的消息头和文件流,并将文件保存到本地;
  • 支持选择本地文件并发送包含文件信息的消息头和文件流到服务端。

filetrans's People

Contributors

stellasong12 avatar

Watchers

James Cloos 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.