Open tabascoeye opened 10 years ago
int lwip_getlasterror(int s);
to src\include\lwip\socket.h
src\api\sockets.c
int lwip_getlasterror(int s)
{
struct lwip_sock *sock = get_socket(s);
if(sock){
return(sock->err);
} else {
return(-1);
}
}
The socket API is missing a function to find out the last error that happened to a socket. if you don't have an "errno" mechanism in your system, this might be a good alternative to find out what specific error happened last on a socket.