用电话线发送FIle [英] Sending FIle with phone line

查看:60
本文介绍了用电话线发送FIle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我需要在我的应用程序中添加新项目,通过电话线发送文件,没有互联网的简单调制解调器。



我的主要语言是C#。



请帮助我,我已经坚持这个项目两周了。

Hi
I need to add new items to my application for sending files through phone line with no internet only simple modem.

My main language is C#.

Please help me, I'm stuck with this project for two weeks.

推荐答案

它有点困难,因为你在这里告诉我们很多 - 例如,你是否还必须为收件人提供程序/代码(在电话线的另一端),或者,您只是客户吗?



如果您只是发件人/客户,那么接收方/服务器期望的文件/传输协议是什么?



如果这是我,我将抽象我的程序的设计/实现,以便通过调制解调器,或以太网或协议x发送的能力是可插入的,即我' d考虑接口 - 你将特定发送协议的实现接口交给'send'方法 - 这意味着你可以在你的电脑上本地实施一个测试'接收器'/服务器程序,以确保你有正确的工作 - 使用调制解调器测试,取决于文件的大小,数据成本等,可能是昂贵的



使用调制解调器本身并不难 - 您需要搜索C#串行通信,这应该提供有关如何通过调制解调器初始化,拨号,发送数据等方面的足够信息 - 就像我一样如果你抽象发送 - > '运营商'界面,您可以在自己的电脑上使用环回建模串行通信



'g'
Its a bit hard given you havnt told us a whole lot here - for example, do you also have to supply the program/code for the recipient (on the other end of the phone line), or, are you only the client ?

If you are only a sender/client, then what file/transfer protocol does the receiver/server expect ?

If this were me I'd be abstracting the design/implementation of my program so that the ability to send via modem, or ethernet or protocol x was 'plugable', ie, I'd be thinking in terms of interfaces - you hand an interface to the implementation of a particular send protocol to a 'send' method - this means that you could implement a test 'receiver'/server program locally on your pc to make sure you have the guts working correctly - testing using a modem, depending on the size of the file, data cost etc, could be expensive

To use a modem itself isnt that hard - you need to search for C# Serial communications, which should provide enough information on how to do things like initialise, dial, send data via the modem - as I said, if you abstract the send -> 'carrier' interface , you can model serial communications for example using a loopback on your own pc

'g'


I havnt还发现了一个开源的kermit / xmodem / ...协议实现 - 有商业的,有些甚至用C#Classes而不是必须使用P / Invoke ..这是一个有趣的网站,我发现可能有足够的让你开始关于基本的c#系列通信虽然



https://www.evernote.com/shard/s8/sh/4e10425d-a7aa-4b14-88a9-ea8b8f61c125/f1ce1f86a347932a636a950b2d7cefa2 [ ^ ]



'g'
I havnt yet found an open source kermit/xmodem/... protocol implementation - there are commercial ones, some even with C# Classes rather than having to use P/Invoke ..this is an interesting site I found that may have enough get you started on basic c# serial comms though

https://www.evernote.com/shard/s8/sh/4e10425d-a7aa-4b14-88a9-ea8b8f61c125/f1ce1f86a347932a636a950b2d7cefa2[^]

'g'


这篇关于用电话线发送FIle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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