Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 3rd, 2003, 10:52 AM
milanvla milanvla is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 21 milanvla User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 25 sec
Reputation Power: 0
I need help to develop simple Java Chat

Hi

i need help to develop simple Java chat.
it will run from web browser. how to start?

thank you very much

Reply With Quote
  #2  
Old July 18th, 2003, 03:02 PM
Jaye Jaye is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 1 Jaye User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Chat huh...

I'm new to Java but I do know that making a simple chat is quite simple... in C++ I used winsock and it goes something like this.

First you initialize winsock, declare a socket, send and recv messages with the server.

With most every networking libs I've seen it goes something like this int Send(socket, buffer, bufferlength) ... with my chat application the buffer is a simple char array. In a chat you need to come up with some type of protocol. The simplest would be something like char Buffer[] = "<MSGID> <PARAMETERS> <MESSAGE>"; for a simple chat message to a room it could be.... "PRIVMSG ROOMNAME Hi how are you?"; then the server should be able to split that into parts. I'm pretty sure that it would be somewhat the same in java, after all this is concept not syntax. You might want to open a raw connection to an irc room and see how the IRC protocol works if you have trouble with protocol.

Also... you need to decide if you will be using blocking or non-blocking sockets....

Blocking: When the program is running and runs into a Send() or Recv() function it stops until something is sent or recevied.... this can be very bad troublesome.

Non-Blocking: The Send() and Recv() functions (particularly the Recv() ) run in a seprate thread so that the program can continue execution while it waits for a message to be received.

I hope this helps.

-Jaye

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > I need help to develop simple Java Chat


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap