Code Monkey home page Code Monkey logo

cn-assignment's Introduction

Assignment 2

Check respective question folder for running instructions.

Ques 1

Write a simple client-server program that uses stream socket and provides chat facility. Your application allows a user on one machine to type in and send text to a user on another machine.

Ques 2

a. Create three programs, two of which are clients to a single server using datagram socket. Client1 will send a character to the server process. The server will decrement the letter to the next letter in the alphabet and send the result to client2. Client2 prints the letter it receives and then all the processes terminate. Compile and run this exercise.

b. Send a C structure that includes data of type character, integer and float from client1 to the server. The server should change the values so that client2 receives a structure with entirely different data. It is not permitted that the data should be converted to any other data type before transmission.

Ques 3

You need to build a very simple client-server operation using the Stream capabilities. You are to build a client and server pair, to implement your own little directory service. Suppose that the server has the following database:

0 Bob
3 Anne
5 Barb
7 Ray
9 Denbigh
10 Terri
104 John

This can be in a file that is read. The client is to read a request, which is a numeric address to be sent to the server. The servers look up the matching name and send it back to the client to be printed out. If the address isn't found, the server should send back an error message. For example, "Address not found".

cn-assignment's People

Contributors

rkbp-099 avatar

Watchers

James Cloos avatar  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.