• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

a total newbie in Sockets

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi there..
i am an IT student...
2nd year college.
we were given a project of a simple chat program that will run through the LAN
i tried and searched google for the API of java.net and it makes me feel like im heading to a huge wall that is a kilometer thick.
i mean, its really put my head into complete ache.
can you suggest me some quite simple examples and snippets on how to start this project..

ps. all i need is about the import java.net.*; and its functions essential to the chat program that i will be making.
GUI is not a matter for me because i guess i already have enough knowledge on it.

thanks.
 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jhedzkie,

Writing a simple chat application is easier that it seems, believe me! There are a lot of good tutorials (java socket tutorial), here you'll find a tutorial with code samples!
 
Aron Jhed Amiscosa
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Lorand Komaromi wrote:Hi Jhedzkie,

Writing a simple chat application is easier that it seems, believe me! There are a lot of good tutorials (java socket tutorial), here you'll find a tutorial with code samples!



hi there.
thanks for the response..

i went to some more research and came out with these to classes that i copied and tried to study.....

the provider [server]


and the requester [client]


its working, but i just want to know how to make it interactive?

i mean, the communication is got from the input of the user.
because, as i can see in these codes, the exchange here is built in the program and ends with "bye."
i want it to accept user inputs to make it an interactive chat..

i already tried the BufferedReader but i cant seem to understand where to put it there..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic