://www.comfortsoftware.be
http://www.expertsoftware.be
> -Oorspronkelijk bericht-
> Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
> Namens Éric Fleming Bonilha
> Verzonden: maandag 1 augustus 2011 21:39
> Aan: 'ICS support mailing'
> Onderwerp: Re
augustus 2011 16:57
Aan: ICS support mailing
Onderwerp: Re: [twsocket] Socket flushing
Wilfried Mestdagh wrote:
> Hi Eric,
>
>> Socket.Send(@Data[0], Length(Data));
>> Socket.Close;
>
> I think this is better:
>
>> Socket.Send(@Data[0], Length(Data));
>> Soc
cht-
> Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
> Namens Arno Garrels
> Verzonden: maandag 1 augustus 2011 16:57
> Aan: ICS support mailing
> Onderwerp: Re: [twsocket] Socket flushing
>
> Wilfried Mestdagh wrote:
> > Hi Eric,
> >
&g
Wilfried Mestdagh wrote:
> Hi Eric,
>
>> Socket.Send(@Data[0], Length(Data));
>> Socket.Close;
>
> I think this is better:
>
>> Socket.Send(@Data[0], Length(Data));
>> Socket.Shutdown(1);
This can be dangerous, Shutdown(1) disables sends on the socket,
if not all has been sent yet you'll get a
Hi Eric,
> Socket.Send(@Data[0], Length(Data));
> Socket.Close;
I think this is better:
> Socket.Send(@Data[0], Length(Data));
> Socket.Shutdown(1);
This will send all data, telling the other end to signal to close when
received. There is in your case no need to call the Flush method.
--
mvg,
If the reason that you call the Flush method is because you want to be
sure
all is sent before closing the socket then you can better call ShutDown(1)
method.
Yes, thats it, it is something like this
Socket.Send(@Data[0], Length(Data));
Socket.Close;
But I have found that if my data is small
Hi Arno,
> Why? Do you have arguments?
No, just something I recall, but it is very long time ago so I assume you
are right.
> I agree that Flush generally violates the async paradigm and
> _might cause problems, however removing the call to MessagePump
> should not make a difference.
OK
--
mv
Arno Garrels wrote:
> Wilfried Mestdagh wrote:
>> H Eric,
>>
>>> If I keep a loop like this
>>>
>>> while (FHSocket <> INVALID_SOCKET) and (not bAllSent) do
>>> TryToSend;
>>>
>>> And TryToSend fails, will it fail everytime if I don´t call the
>>> message pump? In this case an infinite loop wo
Wilfried Mestdagh wrote:
> H Eric,
>
>> If I keep a loop like this
>>
>> while (FHSocket <> INVALID_SOCKET) and (not bAllSent) do
>> TryToSend;
>>
>> And TryToSend fails, will it fail everytime if I don´t call the
>> message pump? In this case an infinite loop would happen right?
>
> I think
Hi Eric,
If the reason that you call the Flush method is because you want to be sure
all is sent before closing the socket then you can better call ShutDown(1)
method.
--
mvg, Wilfried
http://www.mestdagh.biz
http://www.comfortsoftware.be
http://www.expertsoftware.be
--
To unsubscribe or change
H Eric,
> If I keep a loop like this
>
> while (FHSocket <> INVALID_SOCKET) and (not bAllSent) do
> TryToSend;
>
> And TryToSend fails, will it fail everytime if I don´t call the message
> pump? In this case an infinite loop would happen right?
I think so yes.
--
mvg, Wilfried
http://www.me
upport mailing
Onderwerp: Re: [twsocket] Socket flushing
Nobody knows???
Eric
-Mensagem Original-
From: Éric Fleming Bonilha
Sent: Friday, July 22, 2011 5:35 PM
To: ICS support mailing
Subject: Re: [twsocket] Socket flushing
> What issues?
It is a weird issue... it actually create
t; Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
> Namens Éric Fleming Bonilha
> Verzonden: maandag 25 juli 2011 14:50
> Aan: ICS support mailing
> Onderwerp: Re: [twsocket] Socket flushing
>
> Nobody knows???
>
> Eric
>
> -Mensagem Origin
July 22, 2011 5:35 PM
> To: ICS support mailing
> Subject: Re: [twsocket] Socket flushing
>
>> What issues?
>
> It is a weird issue... it actually creates a stack overflow because
> in some parts of my app I need to call flush, and flush calls the
> messageloop and on mess
Nobody knows???
Eric
-Mensagem Original-
From: Éric Fleming Bonilha
Sent: Friday, July 22, 2011 5:35 PM
To: ICS support mailing
Subject: Re: [twsocket] Socket flushing
What issues?
It is a weird issue... it actually creates a stack overflow because in some
parts of my app I need
What issues?
It is a weird issue... it actually creates a stack overflow because in some
parts of my app I need to call flush, and flush calls the messageloop and on
messageloop some timer routines are called that enters again on the same
routine to flush the socket! it is complicated... and
are.be
> -Oorspronkelijk bericht-
> Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
> Namens Éric Fleming Bonilha
> Verzonden: donderdag 21 juli 2011 22:30
> Aan: ICS support mailing
> Onderwerp: [twsocket] Socket flushing
>
> Hi
>
> I´m having
Hi
I´m having some issues with socket flushing due to the messageloop that it
calls:
procedure TCustomWSocket.Flush;
begin
while (FHSocket <> INVALID_SOCKET) and { No more socket }
(not bAllSent) do begin { Nothing to send }
{ Break; }
TryToS
18 matches
Mail list logo