Results 1 to 20 of 28
- 08-24-2011, 06:48 PM #1
Member
- Join Date
- Aug 2011
- Posts
- 18
- Rep Power
- 0
- 08-24-2011, 08:13 PM #2
If you post any code please enclose it in code tags. Use the #icon above the input box.
- 08-25-2011, 09:23 AM #3
Member
- Join Date
- Aug 2011
- Posts
- 18
- Rep Power
- 0
plzzzz help me out in this problem
i have studied my code again n i got problem acc. to me when new set of user connected to private chat then server's thread for private chat is replaced by new thread thts why all private messages go to new private chat windows instead of previous private chat windows
PLZZZZ STUDY PRIVATECONNECTION CLASS, PRIVATEMESSAGE CLASS,CHECKS CLASS IN SERVER FILE and PRIVATE MESSAGE CLASS , CHECK CLASS IN CLIENT FILE
- 08-25-2011, 10:06 AM #4
Check this immediately. Read the whole page.
db
- 08-25-2011, 10:45 AM #5
Member
- Join Date
- Aug 2011
- Posts
- 18
- Rep Power
- 0
thnx i hv read but there s nthng related to my work. i m getting problem with threeads
i want my server to issue a new thread to set of users as user request for private chat but as new set of users requests ffor private chat server is replacing old thread with new thread and all previous msgs also gng to new set of users as public chat plz study my code and help me
- 08-25-2011, 11:05 AM #6
Member
- Join Date
- Aug 2011
- Posts
- 18
- Rep Power
- 0
how to give tags mr norm
- 08-25-2011, 02:33 PM #7
Use the #icon above the input box. Select your code and press that icon.
- 08-25-2011, 02:35 PM #8
Member
- Join Date
- Aug 2011
- Posts
- 18
- Rep Power
- 0
k let me post my thread again
- 08-25-2011, 02:45 PM #9
Member
- Join Date
- Aug 2011
- Posts
- 18
- Rep Power
- 0
mr.norm sir plzz give a look at my code n suggwst me any solution regarding this i am not getn anythng regarding this
- 08-25-2011, 02:51 PM #10
You have posted a lot of code. Too much for most people to want to look through.
Also The code is mostly unformatted which makes it twice as hard to read. Without proper indentation and alignment of { beneath the line with the beginning { it makes it very hard to read.
Also there is no comments describing what each section of the code does.
Also the code does not follow java naming standards: class names begin with Uppercase
Sorry, I have no interest in trying to read this code and figure out its problems.
- 08-25-2011, 03:18 PM #11
Member
- Join Date
- Aug 2011
- Posts
- 18
- Rep Power
- 0
ok ok i will do as u say u just check it out after half an hr.
- 08-25-2011, 04:23 PM #12
The way I debug this kind of code is by adding lots of printlns to show the execution flow and the values of variables as they change. By looking at the printouts you can see where the logic is going wrong.
Have you tried that yet?
Also you need a "script" or piece of code that will create the classes and call the methods in the correct order and do it automatically so that there is no user intervention required.
Then to test the code you start the script which does whatever needs to be done to show the problem. You look at the print out,
see that more print out is needed, add more print outs and run the test again. Eventually you see where the logic problem is.
You change the code to fix it and run the script. Now the output is correct and you have solved the problem.Last edited by Norm; 08-25-2011 at 04:26 PM.
- 08-25-2011, 04:24 PM #13
Member
- Join Date
- Aug 2011
- Posts
- 18
- Rep Power
- 0
yes sir i had tried tht
- 08-25-2011, 04:26 PM #14
Member
- Join Date
- Aug 2011
- Posts
- 18
- Rep Power
- 0
somehow i know the problem wht it can be
i am starting a thread private message after a set of user connect to private chat tht thread contains arraylist containg tht two users socket address and their socket object for creating streams
but when new set of user is starting private chat previous thread is getting terminated
- 08-25-2011, 04:27 PM #15
Member
- Join Date
- Aug 2011
- Posts
- 18
- Rep Power
- 0
u plzzz run my code u will automatically get to know the problem because i have added printlns to show ddata flow
u jst need to run my code u will get to know the problem
- 08-25-2011, 04:30 PM #16
What one class can I start to execute your code? I want to be able to start a single class to demonstrate the problem.
- 08-25-2011, 04:31 PM #17
Member
- Join Date
- Aug 2011
- Posts
- 18
- Rep Power
- 0
wait plzzzz let me posted login class also for execution
- 08-25-2011, 04:36 PM #18
Member
- Join Date
- Aug 2011
- Posts
- 18
- Rep Power
- 0
now u just run server file first then server will start running
then u put login file and client file at same place
run login file which will automatically run client file u hv to run client file 3 times to make 3 users in chat
then click on any one user in userlist u will get private chat windows
till now it will be working fine then u start private chat with third user also then u will see the problem
- 08-25-2011, 04:41 PM #19
Can you write code to do all that so all I enter is:now u just run server file first then server will start running
then u put login file and client file at same place
run login file which will automatically run client file u hv to run client file 3 times to make 3 users in chat
then click on any one user in userlist u will get private chat windows
till now it will be working fine then u start private chat with third user also then u will see the problem
java StartThePrograms
and ALL of the above is done automatically
- 08-25-2011, 04:51 PM #20
Member
- Join Date
- Aug 2011
- Posts
- 18
- Rep Power
- 0
Similar Threads
-
MultiClient with Single Server
By prince87 in forum Threads and SynchronizationReplies: 1Last Post: 05-01-2011, 01:03 AM -
Ideas about private to private IP networking over the Internet
By mr_anderson in forum Advanced JavaReplies: 7Last Post: 06-28-2010, 07:52 AM -
How to write in private chat room
By mischaila in forum New To JavaReplies: 2Last Post: 05-28-2010, 02:07 PM -
How to implement private chat application using jsp
By PortalTeam in forum JavaServer Pages (JSP) and JSTLReplies: 9Last Post: 02-19-2010, 10:49 PM -
multiclient copy
By thuyduong89dt in forum NetworkingReplies: 0Last Post: 12-04-2009, 01:46 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks