[fpc-devel] using sockets on linux and win32
tony at maro.net
Thu Jan 26 20:00:38 CET 2006
Stefan Kisdaroczi wrote:
> im trying to use sockets in a unit which should work on linux and win32.
> I use the sockets unit, but for things like SOL_SOCKET, TTimeval (for setsockopt), SO_RCVTIMEO, fpgeterrno
> I finally had to use unix,unixtype,baseunix. This on Linux.
> Now I try to compile it on windows:
> It seems I need SocketError and not fpgeterrno ( there is a thread about that some days old ).
> But where do I find SOL_SOCKET for windows? using winsock did not help.
> I searched for a good example using google, searched the fpc docs... there seems to be a lot of outdated information.
> And now the question:
> Has someone an "uses"-clause compatible with linux and windows for an app really using sockets and not only for a simple "hello socket"?
> thank you
I'd recommend Synapse tools. They're blocking only, but I have used
them extensively. They even support HTTP file transfers and SSL.
But, I'm not too up on what the latest sockets development in FPC has
been, perhaps there's something better now.
More information about the fpc-devel