Skip to content

deepforce/A-Simple-HTTP-Server-with-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Build a simple HTTP sever with Java

How to make HTTP Server in Java

You can use ServerSocketclass in Java to create a Server which can accept requests.

Blocking Method

Blocking methods in Java are those methods which block the executing thread until their operation finished.

A famous example of blocking method is InputStream read() method which blocks until all data from InputStream has been read completely.

HTTP

This is the standard HTTP Server, its simple because HTTP is stateless, which means it doesn't need to remember previous connection, all it care for new incoming connections. This is endless cycle until server is stopped.

It's better to use BufferedReader because browser will send multiple line.

Resources

1.Java Network Programming, 4th Addition

About

Build a Simple HTTP Server with Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages