Hi all, I am using BDS2006 to write a service application that creates a TWSocketServer and waits for connections. When a connection is made, the client sends requests and the service processes the requests and returns the results.
This is all being done with LineMode enabled. I've written a similar module in another application recently and that went without a hitch. In this particular case (using code copied from the other application), in OnDataAvailable for the TWSocketClient I type cast the Sender to a TWSocketClient and then call ReceiveStr to retrieve the data. This was resulting in an empty string, despite the fact that by inspecting the object I could see there is data in the receive buffer. Further investigation/testing has revealed that I'm getting error 10035 (operation would block) and wondered why this would happen now and not previously. The only thing I can think of that I'm doing different is that the testing is being done on one machine, whereas I don't think I did that previously. However, I have tested this application with the client on another machine and it exhibits the same problem. Another thing I noticed is that if I do: AnsiString msg = ((TWSocketClient*)Sender)->ReceiveStr(); at the start of the OnDataAvailable event, then I get the data coming through. But I believe (based on the existing application that works) that I should be able to typecast the Sender variable first. Does anyone have any suggestions about what might be going wrong here? Regards, Bevan Edwards -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be