No. Actually it works like the tcpclientdemo. I disconnect when the data is received fully. Then I wait for a new request from the webserver. Then I send the data to the appserver by connecting again. It's like hitting disconnect button, then fill string and hit send in the demo.

albert

----- Original Message ----- From: "wilfried Mestdagh" <wilfr...@mestdagh.biz>
To: "'ICS support mailing'" <twsocket@elists.org>
Sent: Tuesday, May 04, 2010 4:29 PM
Subject: Re: [twsocket] client problem


Hi,

Do you reconnect in the OnClose event?
If so do it outside it by posting a message to a custom message handler.

--
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be


-----Oorspronkelijk bericht-----
Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens
A Drent
Verzonden: dinsdag 4 mei 2010 15:50
Aan: ICS support mailing
Onderwerp: Re: [twsocket] client problem

I managed to solve this issue, point was that the banner is alway sent and I

was closing the socket while data was still sent. I'm  now closing the
socket at the right time and this works well now (verified on server).

However another problem arises. If I reconnect I get a WSAAsyncSelect
exception.

Invalid argument (#10022 in WSAAsyncSelect)

from the line
  SocketError('WSAAsyncSelect');

in OverbyteICSSocket.

Now this realy puzzles me. I've waited for all the events to occur before
closing the socket. I wait for the event that the socket is closed. Then I
want to send new data, the socket is filled with the correct parms,
connected and... the error. Anybody knows why?

albert

----- Original Message ----- From: "A Drent" <a.dr...@aducom.com>
To: <twsocket@elists.org>
Sent: Tuesday, May 04, 2010 12:11 PM
Subject: [twsocket] client problem


I have a small webapplication who needs to connect to several servers
depending on the data sent. The response of this server will be send back
to the end-user. The server responds well. If I use the clientdemo it all
works as expected.

However, in my webapplication things go wrong while the code is straight
forward like the clientdemo. There are only a few things differently: I
need a synchronous call. So I have to wait until the ondatasent has
finished. On this event I set a status bit to allow the application to go
on. The first time it works, the second time, it doesn't, the third time
it works, etc.

I'm using the messagepump of the clientsocket to wait:

function TWebModule5.BuildUDDI : string;
begin
  bMsgOk := false;
  while not bMsgOk do begin
     CliSocket.MessagePump;
     sleep(100);
  end;
  result := Buffer;
end;

I'm sure I'm doing things wrong. Hints?

albert
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to