Demonstrate a minimal server and client program, JAVA Programming

Assignment Help:

This exercise will give you some introductory exposure to network programming with sockets. Your task is to demonstrate a minimal server program and client program that can send one small text message to each other. You need to do this in Java and also in C. Note, however, that for this exercise you are free to source example code from anywhere you like, including the internet and fellow students, as long as you can compile it, demonstrate it running, and answer your tutor's questions about how it works.

Task 1

Demonstrate a Java client and server exchanging one text message in each direction.

Task 2

Demonstrate a C client and server exchanging one text message in each direction.

Task 3

Demonstrate your C client exchanging one message in each direction with your Java server, or vice versa.

Further Requirements:

1. Your code must run on the CSEM unix computers to earn marks.

2. Your client code should accept an arbitrary text message from the user, up to at least 40 characters in length, and send it to your server. String input can be as a command-line parameter or as standard input (whichever you prefer - not necessary to do both).

3. Your server should display the incoming client message on-screen. The simplest way to do this is to use System.out.println() in Java or printf() in C to write to standard out.

4. Your server should then send a message back to the client which contains the original message, prepended with a short prefix string. The prefix string should be supplied by the user (again, either as a command-line argument, or read from stdin).

5. Your client should display on-screen the message it receives from the server.

6. You need to be able to show your tutor that you can compile and run the code yourself, and your tutor may ask you some questions about the code to check that you do have some basic understanding of what it is doing.

7. You MUST run your server code ONLY on barker, not on any other CSEM machine. You can log into barker by typing ssh barker from any CSEM student login machine. Address details for barker are: DNS Name: barker.csem.flinders.edu.au IP Address: 129.96.22.79

8. Your server MUST use a port number that is equal to YOUR unix uid number. This is to ensure that every student uses a unique port number so we don't get conflicts. To find your unix uid number, type the "id" at the command prompt on any CSEM unix host and use the number displayed after "uid=".

NOTE: Rules 7 and 8 have been specified by the Manager, CSEM Computing Services Group and MUST be complied with by all students. Breaches may attract undesirable consequences.


Related Discussions:- Demonstrate a minimal server and client program

Test the applet sample , Obtain ONE of the sample applets from Sun Microsys...

Obtain ONE of the sample applets from Sun Microsystems' Applets page, or any other source for free Java applets you may wish to use. Test the applet, and link it to Part 2 of your

Hotel online booking system, who can helps me with pseudocode with that top...

who can helps me with pseudocode with that topic above mencioned

Exportobject of unicastremoteobject do, What does the exportObject of Unica...

What does the exportObject of UnicastRemoteObject do? Ans) Exports the remote object to make it available to receive incoming calls, using the certain supplied port. If port not

Arrays, examples of 2D arrays

examples of 2D arrays

Describe in general how java garbage collector works, Describe, in general,...

Describe, in general, how java garbage collector works?

Illustrate dynamic vs. static class loading?, 1. "Classes are statically lo...

1. "Classes are statically loaded with Java's "new" operator." This would imply that static methods could be executed without the class being loaded. 2. "Unlike the static loa

Design a program for robot, Assume all the obstacles are of height 4 units ...

Assume all the obstacles are of height 4 units and the blocks are of heights 1 (bottom), 2 (top), 1 and 2 (top) units respectively.  Complete the control() method of the RobotContr

Explain pop, SMTP (Simple Mail Transfer Protocol) permits two mail servers ...

SMTP (Simple Mail Transfer Protocol) permits two mail servers to communicate using a easy language, and gives a step-by-step protocol for exchanging information. SMTP delivers m

Translate four row solitaires from java swing to android, Translate Four Ro...

Translate Four Row Solitaires from Java Swing to Android. Project Description: There is a product known Four Row Solitaire listed in GitHub. I would like Swing GUI to be repl

I want crime management website, I want Crime Management website Project...

I want Crime Management website Project Description: It is a web based project build in J2EE as front end and Oracle as back end for peoples so they will register complaints

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd