网络应用服务器
我对网络开发非常陌生,但我会尽力解释我的问题。
我正在制作一个基本的聊天室程序(用 C# 编写),但我以前从未制作过自己的在线服务器,它需要响应 tcp 数据包。我知道服务器是如何工作的,但我只是不知道如何实现我的服务器以及人们如何访问它。
希望这是清楚的。提前致谢。
编辑:抱歉,我并不是想询问聊天/服务器应用程序的示例,我已经知道它们是如何工作的。我的问题是如何托管一个任何人都可以访问的在线服务器?它们是用 php 编写的吗? asp?我不想在我的计算机上运行将成为“服务器”的应用程序。谢谢!
I'm very new to web development but I will try to explain my question as best I can.
I am making a basic chatroom program (in C#) but I have never made my own online server before, and it needs to respond to tcp packets. I know how a server works, I just don't know how to implement my server and how people will be able to access it.
Hope thats clear. Thanks in advance.
Edit: Sorry I didn't mean to ask for examples of chat/server applications, I already know how they work. My question is how do i host an online server that is accessible to anyone?Are they written in php? asp?I dont want to be running an application on my computer that will be the "server". Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果你想研究一些现有的网络应用程序,我推荐twisted项目;它包含一个 Web 服务器、众多聊天客户端、聊天服务器、邮件服务器等等。
聊天客户端和服务器的一些示例 C# 代码: http://www.developerfusion.com/code/3574/a-chat-clientserver-program-for-c/
If you like to study some existing network applications, i recommend the twisted project; it contains a web server, numerous chat clients, chat servers, mail servers, and more.
Some example C# code for a chat client and server: http://www.developerfusion.com/code/3574/a-chat-clientserver-program-for-c/
您可以查看Web Tornado。
他们有一个聊天应用程序示例,它基本上是一个轻量级、非阻塞的 Web 服务器。它是用Python编写的。
You can take a look at Web Tornado.
They have a chat application sample, and it's basically a light, non-blocking web server. It is written in python.
如果您使用的是 C#,那么您也可以查看信号 R。它之所以变得流行,是因为基于事件的拉/推机制可以帮助您开发聊天室。
if you are using c# then you can have a look on signal R as well. It is getting popular because of event based pull / push mechanism which may assist you in the development of chat room.