User Profile

Collapse

Profile Sidebar

Collapse
AlannY
AlannY
Joined: Jan 6 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • AlannY
    replied to send() on non-blocking sockets
    in C
    All right, I solved this problem.

    Thanks to everyone ;-)
    See more | Go to post

    Leave a comment:


  • AlannY
    started a topic Detect if connection was closed on remote side
    in C

    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
    ...
    See more | Go to post

  • AlannY
    started a topic send() on non-blocking sockets
    in C

    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
    ...
    See more | Go to post

  • AlannY
    started a topic Relative path to absolute
    in C

    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 ;-(
    See more | Go to post
No activity results to display
Show More
Working...