Forums Register Login

No Data - Socket

+Pie Number of slices to send: Send
Hello everyone. I'm trying to write a client socket that connects to a mainframe. This is the first time I've used sockets, so I'm definitely green on this.

Bottom line, when I connect to the server, the cursor just blinks, waiting for data. I've tried Google searches and found some good resources, but didn't find the exact answer to my question. So, naturally, I came here!

Here is my code: For security reasons, I'm not putting the actual IP address.


Thanks!!
+Pie Number of slices to send: Send
Using BufferedReader.readLine() is a Bad Idea with sockets because different platforms use different end-of-line markers.
+Pie Number of slices to send: Send
Joe,

That makes a lot of sense. However, what I don't understand is what is the alternative to input. The article
addressed output only. I have no control over what the server sends me.

Do I have to send something to the server before I get a response?

Thanks!!
+Pie Number of slices to send: Send
 

Originally posted by Claude Cundiff:
Do I have to send something to the server before I get a response?



That's determined by the communication protocol the server uses.

Why don't you try just reading bytes from the server to begin with? Once you've established you can get output, you can refine how you process that information.
My name is Inigo Montoya, you killed my father, prepare to read a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1069 times.
Similar Threads
Multiple sockets cause Threads Hangin
Chat At Server Part Both write and read at the same time?
problem in simple chat application.
sockets: How to receive server response in client
Please find the problem in this code.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:05:56.