Important alert: (current site time 7/15/2013 2:59:09 PM EDT)
 

winzip icon

A basic Client Server application

Email
Submitted on: 5/29/2009 11:07:25 AM
By: Ronald Holland  
Level: Beginner
User Rating: By 11 Users
Compatibility: Java (JDK 1.2), Java (JDK 1.3), Java (JDK 1.4)
Views: 34891
(About the author)
 
     Updated 5/29/09. This example shows you how to build a basic client/server application. This example sends a message from the Client to the Server and the Server acknowledges the receipt of the message. The source and a tutorial are included.

 

HTML:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
//**************************************
//HTML for :A basic Client Server application
//**************************************
Sockets_Tutorial.html
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 24 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

3/9/2004 9:06:19 AMSuvoraj Biswas

Good work, keep it up
(If this comment was disrespectful, please report it.)

 
3/9/2004 11:30:12 PMRonald Holland

Thanx for your words. I appreciate them.

(If this comment was disrespectful, please report it.)

 
4/27/2004 3:35:42 PM

Many many THANKS, the code helped me in my assignment
(If this comment was disrespectful, please report it.)

 
4/28/2004 7:51:20 PMRonald Holland

I am glad the code was helpful Ron
(If this comment was disrespectful, please report it.)

 
5/1/2004 7:08:19 AMBarbulescu Mihai

I will use the code to get started in learning java. tks
(If this comment was disrespectful, please report it.)

 
5/30/2004 7:29:03 PM

Cant express my gratitude to you mate. Would still like to "zip" it all in a warm thank you. Especially for the simple yet powerful tutorial.
God bless you.

(If this comment was disrespectful, please report it.)

 
6/21/2004 8:06:42 PM

Great app. I'm just learning java and this has been very helpful.

Keep the good work comming.

Thanks a lot.

Fernando
(If this comment was disrespectful, please report it.)

 
8/3/2005 3:35:25 AMArif

I'm very interesting with this code.
(If this comment was disrespectful, please report it.)

 
12/4/2006 2:55:34 AMFanfan

Hi, this is a very good program! But can I use it for client to server, then server send to another client chatting?
(If this comment was disrespectful, please report it.)

 
12/4/2006 8:55:42 AMRonald Holland

Sorry... This program is not set up to do what you want. I am thinking about doing something like this soon.
(If this comment was disrespectful, please report it.)

 
4/1/2007 10:37:22 PMcxh

good example!
(If this comment was disrespectful, please report it.)

 
4/2/2007 5:53:42 PMRonald Holland

cxh,

I hope the the code/example was helpful.

Fanfan,

The multithreading example you were looking for is on the way. It would have been here sooner, but I was ...
(If this comment was disrespectful, please report it.)

 
1/18/2009 5:02:19 AMTanushree

I am a new learner . this has been a precious help to me
(If this comment was disrespectful, please report it.)

 
1/22/2009 2:47:59 AManimesh

it helps the basics communication between client & server.
gooooood

(If this comment was disrespectful, please report it.)

 
2/2/2009 1:37:16 PMRonald Holland

You may want to consider reviewing
1- A basic Client Server application II
2- A basic Client Server application III
3- A basic Client Server application IV

also.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.