open webserver

13
OpenWebServer Coded By : Ahmad Imair Al-Quds University (Jerusalem – Palestine)

Upload: ahmed-imair

Post on 06-Aug-2015

252 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Open webserver

OpenWebServerCoded By : Ahmad Imair

Al-Quds University (Jerusalem – Palestine)

Page 2: Open webserver

Tasks of the OpenWebServer:Response for client requested page.Response for client requested command.

Page 3: Open webserver

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: )

Page 4: Open webserver

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)

Page 5: Open webserver

Call_Server() Method

Request_Type(string reg, int length) Method

Page 6: Open webserver

Call_Page(string reg, int len, NetworkStream strem) Method

Search on the OpenWebServer data base for requested page.

IF found

Page 7: Open webserver

If page not found -> build (not found) page on OpenWebServer side. Then send it to client as response message.

Page 8: Open webserver

Call_Command(string reg, int len, NetworkStream strem) MethodCheck the Command syntax:

Page 9: Open webserver

IF syntax correct and command found-> Execute command (and send built in page as acknowledge for execution)

Dynamic Page

Page 10: Open webserver

If syntax correct but command not found -> send command not found (Dynamic page according to command input)

Page 11: Open webserver

If syntax Wrong -> Send syntax error with Help.

Page 12: Open webserver
Page 13: Open webserver

THANK YOU!!