• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

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..
 
snakes are really good at eating slugs. And you wouldn't think it, but so are tiny ads:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic