Skip to content

MF0773/CN_CHomeworks1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CN Homework 1

In the Name of GOD

introduction

This project has three parts:

  • FTP: Simplified FTP server and client. They can transfer files by the means of unix socket.

  • HTTP Web Server: A web server that listen to a special port. Then browser can connect to it and load predifined HTML pages.

  • Chat : Here we have one server and multiple client. Client and Server should communicate each other by a predefined message format.

Note that this file contains a overview of the project and code document is available at docs/html/index.html .

Building

You can build the whole project by running build.sh script:

bash build.sh

It's also possible to clean build output by clean.sh :

bash clean.sh

Running programs

for running of each program you should set current directory then run the output file.

FTP

  • server :

    cd FTP/server/
    ./FTP_server
  • client :

    cd FTP/client/
    ./FTP_client

HTTP Web server

cd web
./web

Directories Description

├── common # common source files between programs. Often contains utility functions. e.g. `isFileExist` function that is common between FTP server and HTTP server.
│   └── include
│       └── nlohmann # json library include path
├── docs # documents generated by doxygen
│   └── html
│       └── search
├── FTP # FTP project
│   ├── client # FTP client source file
│   │   └── clients_disk # FTP client download directory
│   └── server # FTP server source file
│       └── server_disk # # FTP server files
└── web # HTTP web server source file
|    └── disk # directory of storing static files e.g. 404.html

Running reports

a sample functionality of each program has been showed here.

FTP

At first we login by a client:

before ftp

then we download image1.png and upload doc2.pdf:

after ftp

HTTP web server

The result of main html page: main html page

The result of incorrect url: 404 html page

Chat room

Support all order. two user Actived and sent Hello.

chat1 chat2

End Notes

We have used nlohmann json library in this project.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages