Changeset 21 in libcf for trunk/src/cf_socket.c


Ignore:
Timestamp:
02/01/13 17:46:09 (11 years ago)
Author:
cheese
Message:

#1 add test code for multi-threading, socket and multi-threaded logging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cf_socket.c

    r11 r21  
    66
    77#ifdef _WIN32
    8 # include <WinSock2.h>
    98# pragma comment (lib, "ws2_32.lib")
    109# define close(__sock)  closesocket(__sock)
    1110# define sa_family_t    unsigned short
    1211#else
    13 # include <netinet/in.h>
    14 # include <sys/socket.h>
    15 # include <arpa/inet.h>
    16 # include <netdb.h>
    17 # include <unistd.h>
    1812#endif
    1913
     
    216210    }
    217211
    218     return CF_OK;
     212    return sock;
    219213}
    220214
     
    262256
    263257int
    264 CF_Socket_Accept (const int sock,
    265                   void      * address)
     258CF_Socket_Accept (const int             sock,
     259                  struct sockaddr_in    * address)
    266260{
    267261    int                 sockClient;
Note: See TracChangeset for help on using the changeset viewer.