使用socket c#在我的android手机和PC之间传输和接收文件# [英] Transfer and Receive files between my android phone and pc using socket c#

查看:337
本文介绍了使用socket c#在我的android手机和PC之间传输和接收文件#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在c#中尝试过很多套接字编程的例子,它在我的网络中的计算机之间传输文件,但它不会通过wifi传输文件。我是如何使用c#?

解决方案

你当然可以通过多种方式实现它,因为套接字是套接字,在不同平台上非常相似,但有一种方法可以最简单:使用C#在两个平台上编写相同的代码。要在Android上使用C#和其他.NET语言,您需要一个可以在Android上运行的替代CLR实现。这样的事情确实存在:

http://en.wikipedia.org/wiki/Mono_ %28software%29 [ ^ ] 。



不幸的是,Mono for Android(MonoDroid)是商业用途。基于移植Mono构建的开源等价物: https://github.com/koush/androidmono [ ^ ]。



< DD> -SA

I've tried lot of examples of socket programming in c# it transfer files between computers in my network but it wont transferring files over wifi. How i do that using c#?

解决方案

You certainly can do it in a number of ways, because sockets are sockets, very similar on different platforms, but one approach would be the most straightforward: writing the same code on both platforms using C#. To use C# and other .NET languages on Android, you need an alternative CLR implementation, the one which can work on Android. Such thing does exist:
http://en.wikipedia.org/wiki/Mono_%28software%29[^].

Unfortunately, Mono for Android (MonoDroid) is commercial. There is the open-source equivalent based on ported Mono build: https://github.com/koush/androidmono[^].

—SA


这篇关于使用socket c#在我的android手机和PC之间传输和接收文件#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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