Giter VIP home page Giter VIP logo

cs380_02_readbyteswithsendcrc's Introduction

CS380_02_ReadBytesWithSendCRC

Description

  1. Create a Java source file1 named Ex2Client.java with a class named Ex2Client that contains the main method. You can also create any other classes or files as needed.
  2. Your program should create a Socket connection to codebank.xyz port number 38102.
  3. In this program, I will send you 100 bytes, however I will only send half of a byte each time. For example, if one of the 100 bytes has value 0x5A, I would send you two bytes with values 0x05 and 0x0A. 1If you want to use a different language, let me know. 1
  4. For each of the 100 bytes I send, read from the InputStream twice and put the two pieces together to form a single byte. Using the previous example, I sent you 0x05 and 0x0A. You should create from this the byte value 0x5A.
  5. After reconstructing the 100 byte message, use Java’s java.util.zip.CRC32 class to generate a CRC32 error code for the 100 bytes.
  6. Send this CRC code as a sequence of four bytes back to the server.
  7. If the server constructs the same CRC32 code as you, it will then respond with a single byte having value 1, otherwise it will respond with a byte having value 0

cs380_02_readbyteswithsendcrc's People

Contributors

manotoor 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.