搬运工一款文件传输应用, 涉及到 Socket 通信,包括 TCP,UDP 通信。(喜欢的给一个star, 有帮助的给一个fork, 欢迎Star和Fork ^_^)
快传有两种方式可以传输文件:
- Android 应用端发送到 Android 应用端(必须安装应用)
- 通过 Web 浏览器来实现文件的传送 (不必安装应用)
第一种方式主要是是通过设备间发送文件。 文件传输在文件发送端或者是文件接收端通过自定义协议的 Socket 通信来实现。由于文件接收方和文件发送方都要有文件的缩略图,这里采用了 header + body 的自定义协议, header部分包括了文件的信息(长度,大小,缩略图), body 部分就是文件。
第二种方式主要是在 android 应用端架设微型Http服务器来实现文件的传输。这里可以用 ftp 来实现,为什么不用 ftp 呢?因为没有缩略图,这是重点!
Email:[email protected]
Copyright 2017 dreamfish
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.