[fpc-pascal] How to close TInetServer without except?
silvioprog at gmail.com
Fri May 3 02:33:24 CEST 2013
2013/5/2 Zaher Dirkey <parmaja at gmail.com>
> On Thu, May 2, 2013 at 11:47 PM, silvioprog <silvioprog at gmail.com> wrote:
>> I tested current code on Linux, but unfortunately when I try to close,
>> the app stays locked. :|
> Yes headache :P
> Do not close, i use Shutdown
> function TmnSocket.DoShutdown(How: TmnShutdown): TmnError;
> cHow: array[TmnShutdown] of Integer = (0, SHUT_RD, SHUT_WR, SHUT_RDWR);
> c: Integer;
> c := fpshutdown(FHandle, cHow[How]);
> if c = SOCKET_ERROR then
> Result := erFail;
> // RaiseLastOSError; do not raise an error, maybe it is disconnected by
> the other side
> Result := erNone;
> I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3
> Best Regards
> Zaher Dirkey
I tried with fpshotdown and closesocket, like this:
But, same error.
This is not the most serious problem. My dilemma now is to close the app. I
hate working with threads. -.-'
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal