Commit Graph

2 Commits

Author SHA1 Message Date
Gustavo Sverzut Barbieri 5818dc71da efl_net: use SOCKET_FMT to format SOCKET so it works on UNIX and Windows.
On Windows SOCKET is unsigned, thus will cause sign errors when
formatting with "%d" or comparing with signed values.

On UNIX it was quiet and easy to miss, thus a new #define can be used
to check for those. It will use 'unsigned long' as SOCKET, thus will
complain out loud and not even work correctly when using pointers on
64bits UNIX on mistakes -- which should improve the situation.

This helped to fix lots of missing conversions, all fixed.

This partially addresses D4357.
2016-11-18 12:53:32 -02:00
Gustavo Sverzut Barbieri 651ff13616 addded efl_net_{socket,dialer,server}_unix
This introduces AF_UNIX server and dialer, these are not available on
Windows as in that platform we'll create a custom class for native
'local' communication.

In the future we can add a wrapper class Efl.Net.Local that will use
the class for each platform, but won't expose its details.

For instance, if we ever expose 'credentials' (which I didn't because
they are not portable), then it doesn't make sense to try to match
that on Windows. The 'Efl.Net.Local' would just stick to the basics:
Reader, Writer and Closer APIs.
2016-10-26 19:01:03 -02:00