Porting Windows platform C++ to POSIX (Linux) C++ - WSAGetLastError()


Porting Windows platform C++ to POSIX (Linux) C++ - WSAGetLastError()



I am currently porting some Windows mobile C++ code to standard C++.

So I am trying to find alternatives for windows specific functions.

I have had very little luck in finding a standard C++ function that can help me replace the WSAGetLastError() windows specific function.

WSAGetLastError() returns error numbers for errors that occur with sockets in windows.

So I was wondering if anyone was aware of a way to replace this function in standard c++?

A way to get different error numbers for different outcomes of connecting/dissconecting a socket would be sufficent.


Find if file data is an image (php)

1:

Code assistance in Netbeans on Linux
There are no Standard C++ functions supporting sockets. No warning from gcc when function definition in linked source different from function prototype in headerHowever, the POSIX socket functions should all set the errno variable on error - you just need to examine this - it should be declared in errno.h.. Program to open large MySQL dumps
Finding an available network port on the machineMonitor file in Java on Linux 64bits

2:

Preventing multiple process instances on Linux
I would port to Boost.ASIO which will abstract networking differences and likely commit you better performance by using asynchronous calls and overlapped IO. Control Debug Level in C++ Library - Linux When you are done you code will job everywhere boost works..


68 out of 100 based on 43 user ratings 758 reviews

*