On Jan 20, 2007, at 6:44 PM, List Catcher wrote:

I have a simple server I've written in Java, and I'm trying to get an RB application to talk to it. I'm following the TCPSocket example in the language reference. I get connected, and try to send a message to the server using TCPSocket.Write, but it doesn't complete until I close the socket. I don't want to do that, of course, I want to synchronously exchange some messages first.

Not even flush helps, so I figure I must not be terminating the line properly, but I can't figure it out. If I Write a second line then the first line shows up. Below is the code:. (The EOL is a try I added when it didn't work)

So what are you doing if you don't use the close. Is the method just completing and then the socket goes out of scope, or are you using some other while-wend loop?

I personally would not typically use a socket how you are trying to use it. I generally make the socket a property and then create a subclass of the socket and fill out the events. Or, you could stick one on a window and fill out the events that way. Using the events makes it fairly straight forward. I think you can make it work how you are trying to do it, but you will need to do looping and polling and that would seem to be more challenging to get right.

Kevin
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to