wood burning stoves 2.0*
The moose likes Threads and Synchronization and the fly likes Help Debugging my TCP client server program to solve the producer consumer problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Help Debugging my TCP client server program to solve the producer consumer problem" Watch "Help Debugging my TCP client server program to solve the producer consumer problem" New topic
Author

Help Debugging my TCP client server program to solve the producer consumer problem

Nathan Jones
Greenhorn

Joined: Dec 03, 2010
Posts: 6
I have posted on other forums but I am not getting much feedback. Any input would be greatly appreciated. Thanks.

here is my server
In the attachment because coderanch doesn't like one of my variables giving me an English abbreviation error even though it is in the code block

and here is my client



Again any input would be greatly appreciated.
Nathan Jones
Greenhorn

Joined: Dec 03, 2010
Posts: 6
try this again for my server...


Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 3934
    
  17

Hi Nathan,

I don't see any questions. Can you be specific about the problem you are having?

Also, can you post links to the other forums you posted this question to? It would be a waste to re-cover any ground already covered in other forums. If you provide links we can keep an eye on what is said over there and keep things moving forward.

Thanks,
Steve


Steve
Nathan Jones
Greenhorn

Joined: Dec 03, 2010
Posts: 6
Hey thanks for replying. The other forums was not helpful at all, all they did was give me a link. But I turned in a working version of this already, so I am good. I was having a nonstatic variable cannot be called error in my main methods of both the client and the server. Sorry I had to post this twice because of a stupid error, I thought I put the question back in.
Chris Hurst
Ranch Hand

Joined: Oct 26, 2003
Posts: 396

Just as an aside, I've given up writing socket servers from scratch as with nio the complexity has gone up and there is a wealth of open source comms libs can do this kind of thing quite easily and efficiently, have you considered building your server on Apache Mina, Netty or Grizzly for instance unless this is purely a learning exercise.


"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5
Nathan Jones
Greenhorn

Joined: Dec 03, 2010
Posts: 6
Its all about learning, just trying to incorporate synchronization, threads, and sockets in one problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help Debugging my TCP client server program to solve the producer consumer problem
 
Similar Threads
not able to connect...
Sending Serialized Objects to A Server And Displaying the contents
a big problem
Help debugging and running My GUI TCP Chatroom!
Echo client/server application