socket errors

pull/179/head
despair 6 years ago committed by Rick
parent 321251c944
commit 74dcbf8772
No known key found for this signature in database
GPG Key ID: C0EDC8723FDC3465

@ -132,7 +132,11 @@ namespace llarp
virtual void
error()
{
llarp::LogError(strerror(errno));
char ebuf[1024];
int err = WSAGetLastError();
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, nullptr, err, LANG_NEUTRAL,
ebuf, 1024, nullptr);
llarp::LogError(ebuf);
}
virtual int
@ -249,8 +253,7 @@ namespace llarp
uclose(fd);
};
};
#endif
#else
struct posix_ev_io
{
struct WriteBuffer
@ -477,6 +480,7 @@ namespace llarp
close(fd);
};
};
#endif
// finally create aliases by platform
#ifdef _WIN32

@ -25,7 +25,7 @@ struct asio_evt_pkt
struct win32_tun_io;
extern "C" DWORD FAR PASCAL
tun_ev_loop(void* unused);
// list of TUN listeners (useful for exits or other nodes with multiple TUNs
// list of TUN listeners (useful for exits or other nodes with multiple TUNs)
std::list< win32_tun_io* > tun_listeners;
// a single event queue for the TUN interface

Loading…
Cancel
Save