Hi guys,
I am porting a massive framework written with MSVC++ to Linux. I'm currently trying to port some socket code over. The original code makes declarations such as SOCKET _socket etc. Looking at SOCKET in MSVC++ I found out that its a struct socket, and is equivalent to the sockaddr_in structure in Linux. Can anyone confirm this?
Also, the original code occasionally sets a SOCKET to INVALID_SOCKET, which is defined as (SOCKET) (~0). What is this? I was wondering if I can just set the descriptor to -1 instead of this? For example:
SOCKET _socket = INVALID_SOCKET;
Any ideas on this? Also, Isn't ******* supposed to be POSIX compliant? I was hoping porting this would be easier.
Thanks very much for your assistance.
Bookmarks