JMeetUp
An Example Using TCP and UDP
Prof. David Bernstein
James Madison University
Computer Science Department
bernstdh@jmu.edu
Overview
A Classic Conversation:
"What do you want to do? I don't know, what do you want to do?"
The Concept:
Create a tool that a group of friends can use to make plans.
Some Needs
Chat:
A way for everybody who is currently "on line" to exchange ideas
Proposals:
A way for anybody (not just those who are currently "on line") to propose a plan or to vote for an existing proposal
Some Requirements
Chat:
Needn't be reliable so use UDP
Proposals:
Must be reliable so use TCP
Handling Commands
Talk
Propose, Check and Choose
A Proposal
javaexamples/jmeetup/Proposal.java
The Client
javaexamples/jmeetup/Client.java
The Server
javaexamples/jmeetup/Server.java
The Server (cont.)
The Connection Handler
javaexamples/jmeetup/ConnectionHandler.java
There's Always More to Learn