Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Nathan Jones
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this again for my server...


 
Steve Luke
Bartender
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Nathan Jones
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 443
3
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Nathan Jones
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its all about learning, just trying to incorporate synchronization, threads, and sockets in one problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic