[英]How to implement a multithreaded web server in Java
My assignment is to implement a multithreaded web server in Java but i have no idea where to start. 我的任务是用Java实现多线程Web服务器,但我不知道从哪里开始。 All we've seen in the lectures is how tcp works,layers etc.but i have no idea about how to implement a web server. 我们在讲座中看到的只是tcp的工作方式,层等。但是我不知道如何实现Web服务器。
Can you give me a starting point? 你能给我一个起点吗?
Since you don't give much information just some links to helpful resources: 由于您没有提供太多信息,因此仅提供一些指向有用资源的链接:
First of all, you have to make choice about the programming language you want use. 首先,您必须选择要使用的编程语言。 Several languages are particulary useful and more adapted for network programming. 几种语言特别有用,并且更适合于网络编程。 I thinking about Erlang for example. 我以Erlang为例。
You haven't mention which language should you use. 您还没有提到您应该使用哪种语言。 I assumed C/C++. 我假设使用C / C ++。
First, you can look at Boost.Asio library an it's examples . 首先,您可以看一下Boost.Asio库及其示例 。 There are two HTTP server examples. 有两个HTTP服务器示例。
Second, if you need a rough plan on what to do here it is: 其次,如果您需要在这里做一个粗略的计划,那就是:
Exact function names and overall details are dependent on your programming language. 确切的函数名称和总体详细信息取决于您的编程语言。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.