• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try this again for my server...


 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 443
3
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its all about learning, just trying to incorporate synchronization, threads, and sockets in one problem.
 
Come have lunch with me Arthur. Adventure will follow. This tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic