Open webserver
-
Upload
ahmed-imair -
Category
Technology
-
view
254 -
download
0
Transcript of Open webserver
![Page 1: Open webserver](https://reader036.fdocuments.in/reader036/viewer/2022081504/55c32581bb61ebce128b463c/html5/thumbnails/1.jpg)
OpenWebServerCoded By : Ahmad Imair
Al-Quds University (Jerusalem – Palestine)
![Page 2: Open webserver](https://reader036.fdocuments.in/reader036/viewer/2022081504/55c32581bb61ebce128b463c/html5/thumbnails/2.jpg)
Tasks of the OpenWebServer:Response for client requested page.Response for client requested command.
![Page 3: Open webserver](https://reader036.fdocuments.in/reader036/viewer/2022081504/55c32581bb61ebce128b463c/html5/thumbnails/3.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022081504/55c32581bb61ebce128b463c/html5/thumbnails/4.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022081504/55c32581bb61ebce128b463c/html5/thumbnails/5.jpg)
Call_Server() Method
Request_Type(string reg, int length) Method
![Page 6: Open webserver](https://reader036.fdocuments.in/reader036/viewer/2022081504/55c32581bb61ebce128b463c/html5/thumbnails/6.jpg)
Call_Page(string reg, int len, NetworkStream strem) Method
Search on the OpenWebServer data base for requested page.
IF found
![Page 7: Open webserver](https://reader036.fdocuments.in/reader036/viewer/2022081504/55c32581bb61ebce128b463c/html5/thumbnails/7.jpg)
If page not found -> build (not found) page on OpenWebServer side. Then send it to client as response message.
![Page 8: Open webserver](https://reader036.fdocuments.in/reader036/viewer/2022081504/55c32581bb61ebce128b463c/html5/thumbnails/8.jpg)
Call_Command(string reg, int len, NetworkStream strem) MethodCheck the Command syntax:
![Page 9: Open webserver](https://reader036.fdocuments.in/reader036/viewer/2022081504/55c32581bb61ebce128b463c/html5/thumbnails/9.jpg)
IF syntax correct and command found-> Execute command (and send built in page as acknowledge for execution)
Dynamic Page
![Page 10: Open webserver](https://reader036.fdocuments.in/reader036/viewer/2022081504/55c32581bb61ebce128b463c/html5/thumbnails/10.jpg)
If syntax correct but command not found -> send command not found (Dynamic page according to command input)
![Page 11: Open webserver](https://reader036.fdocuments.in/reader036/viewer/2022081504/55c32581bb61ebce128b463c/html5/thumbnails/11.jpg)
If syntax Wrong -> Send syntax error with Help.
![Page 12: Open webserver](https://reader036.fdocuments.in/reader036/viewer/2022081504/55c32581bb61ebce128b463c/html5/thumbnails/12.jpg)
![Page 13: Open webserver](https://reader036.fdocuments.in/reader036/viewer/2022081504/55c32581bb61ebce128b463c/html5/thumbnails/13.jpg)
THANK YOU!!