[fpc-pascal] How to close TInetServer without except?
silvioprog at gmail.com
Mon May 6 07:17:35 CEST 2013
2013/5/5 Ludo Brands <ludo.brands at free.fr>
> On 05/04/2013 09:59 PM, Zaher Dirkey wrote:
> > now in this example
> > They not use Select before accept
> If you are happy with accept blocking or if you use non-blocking sockets
> you don't need select before accept.
> > and in
> >>The parameter /readfds/ identifies the sockets that are to be checked
> > for readability. If the socket is currently in the *listen*
> > <
> > state, it will be marked as readable if >an incoming connection request
> > has been received such that an *accept*
> > <
> > is guaranteed to complete *without blocking*.
> That is exactly the purpose of select. The timeout guarantees that your
> program stays alive and can do something else.
> > I still not sure in windows need Select, but maybe in Linux only, but i
> > can't test it there.
> I repeat, you don't have to use select in Windows or Linux. If you
> prefer blocking sockets you don't need select but accept/recv/send will
> block. If you use non-blocking sockets you need to deal with EAGAIN or
> EWOULDBLOCK (WSAEWOULDBLOCK on windows). There are also alternatives to
> select: poll, epoll, libevent, etc., etc. on linux, WSAPoll on windows
> Vista and later. For completeness, on windows you have also the
> asynchronous overlapped IO mode which is used a lot in high performance
> servers but rather complex to program.
Ludo, I'm almost by completing the units in this link:
https://bitbucket.org/silvioprog/tcpipcomp (this repository is temporary)
The current code (I'm updating it daily) in these units is good? I'm open
to suggestions, and we can change whatever it takes.
I want to send these units to the Free Pascal team and a package to the
Sorry for my English please.
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal