我想要一个带文件传输技术的聊天服务器 [英] I want a chat server with file tranfer technique

查看:84
本文介绍了我想要一个带文件传输技术的聊天服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在c#.Net

I Want a chat system with file transfer in c# .Net

I tried lots of ariticles like http://www.codeproject.com/Articles/12893/TCP-IP-Chat-Application-Using-C but doesnot got the correct solution of the problem and little doubt about listening server and requesting client





我的尝试:



我试过很多像http://www.codeproject.com/Articles/12893/TCP-IP-Chat-Application-Using-C这样的ariticles但是没有得到正确的问题解决方案,对于监听服务器和请求客户端几乎没有疑问



What I have tried:

I tried lots of ariticles like http://www.codeproject.com/Articles/12893/TCP-IP-Chat-Application-Using-C but doesnot got the correct solution of the problem and little doubt about listening server and requesting client

推荐答案

如果要构建企业级应用程序(如聊天应用程序),并且还支持FTP协议(文件传输协议 [ ^ ])。构建聊天应用程序的部分很简单,只需简单的基于HTTP的文本传输到集线器,并且可以使用ASP.NET的Web API来克服。我建议您使用Web API和SignalR来构建聊天应用程序。



1. Web API可用于允许支持HTTP协议的设备之间的通信;几乎所有设备,从电脑,笔记本电脑,手机到平板电脑。

2. SignalR将支持实时双工通信。聊天应用程序所需的类型。

3. ASP.NET Web API是一个非常简单的框架,如果您了解ASP.NET MVC,那么您可能已经了解Web API。



这是聊天应用程序,现在如果你想共享文件。 HTTP也支持文件上传。由于您对TCP / IP通信感兴趣,并且您的问题表明您不是(甚至)中级而是初学者。我会请你继续使用WCF框架。它提供了一个抽象的高级接口,用于构建作为客户端 - 服务器模型的应用程序。作为首发,请阅读:创建Web服务被连接的设备通过互联网使用 [ ^ ]
If you want to build an enterprise level of application such as a chat application, and that also supports FTP protocol (File transfer protocol[^]). The part to build the chatting application would be simple, just simple HTTP based text transfer to the hub and that can be overcome using ASP.NET's Web API. I would recommend that you use Web API and SignalR to build the chat application.

1. Web API can be used to allow communications between devices, that support HTTP protocol ; almost every device from computers, laptops, mobiles to tablets.
2. SignalR would support "real-time" duplex communication. The type required by chat application.
3. ASP.NET Web API is a very simple framework, and if you know ASP.NET MVC, then chances are, you already know Web API.

That is for the chat application, now if you want to share files too. HTTP supports file uploading too. Since you are interested in TCP/IP communication and your question shows that you are not (even) intermediate but a beginner. I would ask you to move on to WCF framework. Which provides an abstracted high-level interface for building applications that work as a client-server model. As a starter, read this: Creating a Web Service to be consumed by connected Devices via Internet[^]


这篇关于我想要一个带文件传输技术的聊天服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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