WikiWealth

19 Jun 2011 01:02 | java programming

Continuing on from what I knew just three weeks ago, I'd like to show you what I've achieved since then. This was an assignment that I handed up several days ago.

It is a whiteboard application… without the whiteboard ;-) It's designed exactly according to the assignment specification, so I want to modify it later (now that it's been handed up) to work with an actual drawing board.

Description

Connecting to the server

java Client [host] [post] [username]

To start the client, I need to provide a host (e.g. localhost or 216.239.51.99) and a port number (anything above 1024, as ports below that number are reserved by the system).

Assuming that the server is already running on that host and port number, the client will connect, and the server will send back a message beginning with "WELCOME".

Sending draw messages

DRAW [x1] [y1] [x2] [y2] [colour]

The idea with the DRAW command is that you provide a series of coordinates that can be used by a whiteboard application to draw a rectangle on the screen of each client (top-left corner at (x1, y1) and bottom-right corner at (x2, y2)).

Once this command has been sent to the server, the server checks that it is valid (coordinates within range, colour is a valid colour) and then sends back a DRAWMSG command to all connected and logged in clients.

Essentially, one client attempts to draw on the screen. If the attempt to draw is accepted by the server, then all clients (including the one that sent the message) will see a rectangle appear on the screen at those coordinates.

Video


Submit Feedback
Please rate this page based on the quality and helpfulness of the content to you.

Average 0% rating from 0 votes.

You may also be interested in…


OLD COMMENT SYSTEM (20 comments)

Add a New Comment
or Sign in as Wikidot user
(will not be published)
- +

01 Oct 2019 12:19

DELETED BY ADMIN


Included page "inc:signature" does not exist (create it now)

Edit | History (1) | Permalink

Add a new comment