如何创建基本Web服务器项目 [英] How to create a basic Web Server Project

查看:116
本文介绍了如何创建基本Web服务器项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Web服务器是一种程序,它使用客户端/服务器模型和万维网的超文本传输​​协议(HTTP),将形成Web页面的文件提供给Web用户(其计算机包含转发其请求的HTTP客户端) 。



我想创建一个小型Web服务器项目,这样我就可以基本了解Web服务器的工作原理。请指导我需要哪些工具。我很满意的编程语言



C / C ++

Python

C#.Net

ASP.Net

A Web Server is a program that, using the client/server model and the World Wide Web's Hypertext Transfer Protocol ( HTTP ), serves the files that form Web pages to Web users (whose computers contain HTTP clients that forward their requests).

I want to create a small Web Server project, So that I can have a basic understanding of how a web server works. Please guide me what tools are required. Programming languages that I'm comfortable with

C/C++
Python
C#.Net
ASP.Net

推荐答案

没有服务器可以简单编程



了解服务器的基本知识。

1.您有一个网络(私人或互联网)。

2.设备(智能手机,个人电脑等)连接到网络并分配了一个IP地址。

3. IP地址在网络中应该是唯一的。

4.所有设备,如果连接到网络,都可以在内部交换数据这样的网络,但仅限于请求。

5.服务器是网络中的任何设备,其软件可以为请求保持开放状态。

6.通常情况下,该软件将具有UDP / TCP协议监听器,并将触发操作,然后将数据传输到要求输入内容的客户端。



所有服务器都遵循这些简单的原则,无论是Web,FTP,SMTP还是ny类型的服务器,区别在于它们向客户传输什么。



7.任何设备都可以有多个服务器(一些邮件,一些ftp) ,一些网站)。这种服务由请求裸露的端口号统治。



这是一篇文章:

构建自己的Web服务器 [ ^ ]
No server will be "simple" to program

Understanding the basics of a server.
1. You have a network (private or the internet).
2. Devices (smartphone, pc, etc) connect to the network and are assigned an IP Address.
3. The IP Address shall be unique within the network.
4. All devices, if connected to a network, can exchange data within such network, but only on request.
5. A server is any device in the network that has the software to stay "open" for requests.
6. Usually, this software will have a UDP/TCP protocols listener, and will trigger actions and then transmission of data to the client that asked for something.

All servers follow these simple principles, whether they are Web, FTP, SMTP or any kind of server, the difference is "what do they transmit to the clients".

7. Any device can have more than one server (some mail, some ftp, some web). The kind of service is "ruled" by the port number the "request" bares.

Here's an article:
Build Your Own Web Server[^]


Homero已经给了你所有正确的方向,对于准备使用的简单实现,您可以考虑 CivetWeb [ ^ ],一个简单的轻量级Web服务器。
Homero already gave you all correct directions, for a simple implementation ready to use you can consider CivetWeb[^], a simple lightweight web server.


即使您要重新创建轮子,我总觉得拆开有用的东西更容易。我有一些朋友过去已经将这些结合到他们的项目中并对此非常满意: http://code.google。 com / p / mongoose / [ ^ ] < br $> b $ b

祝你好运
Even if you were going to recreate the wheel, I always find it easier to take apart something that works. I have some friends that have incorporated this into their projects in the past and were very happy with it: http://code.google.com/p/mongoose/[^]

good luck man


这篇关于如何创建基本Web服务器项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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