OpenWebServerCoded By : Ahmad Imair
Al-Quds University (Jerusalem – Palestine)
Tasks of the OpenWebServer:Response for client requested page.Response for client requested command.
Request (in Client Side)As a client need to know the IP address and
port number of the OpenWebServer.Send request to OpenWebServer asking for a
specific page using web browser.Or send request to OpenWebServer asking to
execute a specific command using the keyword (open: )
Response (in OpenWebServer Side)On OpenWebServer side the OpenWebServer listening to a
specific port for all incoming request from client side. Once the OpenWebServer receive a request -> Examining the
type of incoming request.If request type was page -> search for the requested page
on the OpenWebServer data base (WebServer_DB). If a requested page found fetch the HTML source code and
send it to the client as a response message. Other ways send built in (page not found) HTML source cod.
If request type was command -> check the syntax of the requested command.
If correct -> execute the command with an acknowledgement.If correct but command not found -> Display command not
found.Other ways -> send syntax error page.(Dynamic Page)
Call_Server() Method
Request_Type(string reg, int length) Method
Call_Page(string reg, int len, NetworkStream strem) Method
Search on the OpenWebServer data base for requested page.
IF found
If page not found -> build (not found) page on OpenWebServer side. Then send it to client as response message.
Call_Command(string reg, int len, NetworkStream strem) MethodCheck the Command syntax:
IF syntax correct and command found-> Execute command (and send built in page as acknowledge for execution)
Dynamic Page
If syntax correct but command not found -> send command not found (Dynamic page according to command input)
If syntax Wrong -> Send syntax error with Help.
THANK YOU!!
Top Related