Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a total newbie in Sockets

 
Aron Jhed Amiscosa
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • 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.
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • 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
  • 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..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic