Alexander Todorov wrote:
Hello,
I have an application that uses TCP sockets nut it is going to be
changed with UNIX sockets.
Can you point me to some easy and clean approach how to emulate UNIX
sockets for Windows.
The only thing I can think of is using named pipes and encapsulate the
functionality in some class. Any other alternative are welcome.

Thanks.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

You could use lNet. It's an asynchronic non-blocking, single-threaded OOP net lib for FPC. You can find it at http://members.chello.sk/ales (svn version is in fpcprojects branch on FPC svn).

If nothing else, you can see how I abstracted socket calls to get both windows and unix working.

Ales

P.S: look in lnet.pas and lcommon.pas. The second one abstracts calls like select and FD_SET stuff. The first one has some ifdefs on "recv" and "send".
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to