如何throgh无线网络发送的数据? [英] How send data throgh WiFi?

查看:154
本文介绍了如何throgh无线网络发送的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用我想,如果他们使用的是没有TCP相同的WiFi连接通过WiFi发送文件给多个用户。如何得到谁被连接到指定的wify的用户的列表。 我曾尝试与样品可是我没有得到任何东西。

In my Application I want to send files through WiFi to multiple users if they are using the same WiFi connection Without TCP. how to get the list of the users who are connected to a specified wify. I have tried with Samples But I didn't get anything .

请帮忙。

感谢

推荐答案

TCP是用于文件传输一个良好的交通,我不认为你永远想出一个理由不使用TCP的开始。也没有花哨内置的文件传输协议,所有的Andr​​iod设备可以处理,所以你仍然需要开发一个客户端。

TCP is a great transport for file transfers, I don't think you'll ever come up with a reason to not use TCP to begin with. There is also no fancy built-in file-transfer protocol that all Andriod devices can handle, so you'll still need to develop a client.

此外,强大和可靠的发现也不是完全可能的两种,而无需自定义客户安装你的目的的设备。每个客户端要么需要积极公开本身,还是被动地回复请求。

Besides, robust and reliable discover is not entirely possible either without the devices having custom clients for your purposes installed. Each client would either need to actively disclose itself, or passively reply to requests.

被动的:每个设备都可以是平的实际使用ICMP(并不意味着它是一个功能的设备)版,TCP或本地子网上的UDP数据包。响应客户因此可以发现的点点滴滴,甚至分享他们的扫描结果。

Passive: each device can be "ping"ed using actual ICMP (does not mean it's an enabled device), TCP or UDP packets on the local subnet. Responding clients can thus be discovered bit by bit, and even share their scan results.

有效的:一个反向的方法是让每个功能的客户端发送的组播数据报,并听取他们的意见(类似于如何ARP搜寻工作)。请参阅: http://developer.android.com/reference/java/net/MulticastSocket html的

Active: a reverse approach would be to have each enabled client send out multicast datagrams and listen to them (similar to how ARP discovery works). See: http://developer.android.com/reference/java/net/MulticastSocket.html

每个客户端然后将倾听您的文件数据和元数据的一些结构化,序列化的方式传入的TCP连接,并准备好存储和/或处理这些。奖励积分的身份验证和授权。

Each client would then listen for incoming TCP connections with your file data and meta data in some structured, serialized manner and be ready to store and/or process these. Bonus points for authentication and authorization.

该功能的客户端的方式(与客户端设备),意味着你有可能开发跨平台的客户,让他们互相交谈使用自己的发现和数据传输协议。

The enabled client approach (a device with a client), means that you can potentially develop cross-platform clients and have them talk to one another using your own discover and data transfer protocols.

这篇关于如何throgh无线网络发送的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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