src/sock_internal.h
changeset 4 a3ca0f97a075
parent 3 cc94ae754e2a
child 9 4c4c906cc649
equal deleted inserted replaced
3:cc94ae754e2a 4:a3ca0f97a075
    31     /* Last error info */
    31     /* Last error info */
    32     struct error_info err;
    32     struct error_info err;
    33 };
    33 };
    34 
    34 
    35 #define SOCK_FROM_BASE(sock, type) ((type*) sock)
    35 #define SOCK_FROM_BASE(sock, type) ((type*) sock)
    36 #define SOCK_ERR(sock) ((sock)->err)
    36 #define SOCK_ERR(sock) (&(sock)->err)
    37 
    37 
    38 /*
    38 /*
    39  * Initialize a sock_stream with the given sock_stream_type.
    39  * Initialize a sock_stream with the given sock_stream_type.
    40  *
    40  *
    41  * The sock_stream should be initialized to zero. It is a bug to call this twice.
    41  * The sock_stream should be initialized to zero. It is a bug to call this twice.