All right, I solved this problem.
Thanks to everyone ;-)
User Profile
Collapse
-
Detect if connection was closed on remote side
Hi there. I'm writing a tool, which must detect is connection was terminated on remote side.
Every action on network, I'm fetching with select(). And I want in some place check if connection still active.
There are code:
...Code:while (1) { tv.tv_sec = 1; tv.tv_usec = 0; FD_ZERO (&readfds); FD_SET (priv->socket, &readfds); rc = select -
send() on non-blocking sockets
Hi there. I'm developing a tool, which uses non-blocking sockets on Linux.
When I'm sending something to socket with send(), the return value is -1, which means error. But it's not an error. <errno> indicates that this is EWOULDBLOCK, which means that my request will be async ;-)
I want to get number of bytes really written to socket, but not -1 as I get now.
...Code:switch (errno) { case -
Relative path to absolute
Hi there.
I'm writing a program under Linux. I need a function that convert relative path to absolute (or full path). Under Windows, I have a GetFullPathName function in WinAPI. But now, I need function for Linux (glibc may be).
Can someone help me?
P.S. Googling, googling... nothing found ;-(
No activity results to display
Show More
Leave a comment: