Giter VIP home page Giter VIP logo

cs-f303's Introduction

CS-F303

COMPUTER NETWORKS

Execution Instructions:

Note- First server is to be executed and then followed by client. I have already produced input.txt [deliberately kept it as a file of big size] in order to see the real-time transmission between server and client.

Step0- Open two teminals.

Step1- In terminal 1 run gcc server.c ./a.out

Step2- In terminal 2 run gcc client.c ./a.out input.txt

Step-4 The full transmission and receival of packets will be reflected in both the terminals along with other packet detail atributes. Client will automatically close once it receives the last packet sent by server. Server needs to be manually closed, once client receives final packet chunk and terminates the connection subsequently.


Methodology- System calls like fork() are used to synchronize the dual clients when they are listening to the remote server. Server efficiently uses the file descriptors and system calls to handle multiple client connections without any error. The contents of input.txt are seamlessly tranferred and written in a new file.

Note- If in any case, you need to compile and run this code for more than 1 time, kindly delete the automatically created output file after previous run. Because the previous output file may not be accessed again, due to the immutable inode file descriptors.

For verification purpose, you may please match the file sizes of input and output files.

I have kept a sufficiently large input file.

cs-f303's People

Contributors

bilwa496 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.