Hey everyone,

I'm looking for some help with coming up with a system to communicate data between client and server sockets. I was thinking of a command system, but that would only work when the client is sending a request to the server, not when the server is returning data from a request. How would you accomplish this?

Thanks!

Can you explain further?
Once you have set up the socket connection you have two Streams available (one going each way) so either end can send whatever it wants to the other. What is worrying you exactly?

(why was this showing "zero replies" after I replied before?)

edit: and now it's only showing one?

Hey James,

Thanks for the reply. Turns out after looking at some of my older code using PrintWriters from those Streams, I thought you could only send Strings!! Haha

I think I should be able to figure it out from here :)

Thanks again!

You can open any kind of stream - Object streams, Data streams, whatever you like.
Object streams are the most powerful....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.