跨平台客户端服务器程序,可从Windows到Unix和Vice Versa进行通信 [英] Cross platform Client Server Program to talk from Windows to Unix and Vice Versa

查看:53
本文介绍了跨平台客户端服务器程序,可从Windows到Unix和Vice Versa进行通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


您能建议我什至在考虑编写客户端服务器应用程序之前需要刷新的主题吗?

目的:我需要从Windows客户端从Unix盒发送和接收文件.
我将在Windows计算机上创建一个GUI客户端,然后通过GUI客户端将文件上传和下载到Unix盒中.

我一直在寻找实现跨平台客户端服务器体系结构的时间,但是我只能遇到一些程序或教程来教客户端-服务器程序要么仅针对Windows或UNIX,要么不针对Windows于Unix或针对Windows的Unix. 甚至我也找到了有关RPC和TCP IP程序概念的信息.

关于何时使用RPC或何时编写TCP IP程序,是否有任何具体论据.

如果以上概念与我要达到的目标无关,那么请向我推荐最好的网站,其中包括可指导我的教程.

请注意,作为一个初学者,我正在尝试通过C实现,并且在某种程度上我对使用C编程感到非常自在.

Hi,
Can you please suggest me the topics I need to refresh before even thinking to write a Client Server application.

Purpose: I need to send and receive files from a Unix box from windows client.
I will be creating a GUI client on Windows machine and then through GUI client I want to upload and download files onto Unix box.

I have been searching for a while to implement cross platform client server architecture but I could only come across programs or tutorials teaching client - server programs either targetting only to windows or unix but not between windows to unix or unix to windows.
Even i found information related to concept of RPC and as well as TCP IP programs.

Is there any concrete argument of when to use RPC or when to write TCP IP programs.

If the above concepts are not related to what I am trying to achieve then please suggest me best sites which include tutorials which teach me.

Please note that I am trying to achieve through C as I am a beginner and I feel really comfortable in programming in C to some extent.

推荐答案

与插座搭配使用...最具灵活性.服务器和客户端可以在不同的OS上,在不同的框架上运行,以不同的编程语言编写.共享的是一个开放API,该API仅描述了消息中的字节.完成一次之后,这真的很简单.
At this point, best to go with sockets... most flexibility. Server and client could be on different OS, run on different frameworks, be written in different programming languages. All that is shared is an open-API that simply describes the bytes in the messages. It''s really simple after you''ve done it once.


添加到Albert的解决方案中,您可以尝试查看FTP客户端的示例源代码.

当有很好的支持文件传输的标准时,无需编写自己的协议.
Adding to Albert''s Solution, you may try looking at example source code of FTP clients.

No need to write your own protocol when there are well supported standards out there for file transfer.


并在其中添加到Albert和Jack的答案中是一个快速的答案,因为何时需要使用RPC:

仅当您尝试调用的任何代码使您可以使用它时.

否则,至少在一开始就将其忘记. RPC带有许多行李.您将花费大部分时间来使用接口描述语言,以确保函数调用参数跨越系统之间的巨大鸿沟,而不是对远端发生的事情进行编码.

一旦编写了一些套接字程序,您也许可以开始发现比RPC更适合RPC的问题,但是如果没有更多的了解这两个方面的限制,就可以不使用它而开始.
And adding to Albert''s and Jack''s answers there''s a quick answer as to when you need to use RPC:

Only when whatever code you''re trying to call makes you use it.

Otherwise, forget it, at least at first. RPC comes with loads of baggage. You''d spend most of your time playing with interface description languages to make sure your function call parameters cross the great divide between the systems rather than coding what happens on the far side.

Once you''ve written a few sockets programs you may be able to start finding problems that fit RPC better than sockets but start without it until you know a bit more about both''s limitations.


这篇关于跨平台客户端服务器程序,可从Windows到Unix和Vice Versa进行通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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