src/sock_tcp.c
changeset 21 0911d0b828d4
parent 12 4147fae232d9
child 27 e6639132bead
equal deleted inserted replaced
20:d9c4c2980a0d 21:0911d0b828d4
   124         return ERR_CALLOC;
   124         return ERR_CALLOC;
   125     
   125     
   126     // initialize base with sock_tcp_type
   126     // initialize base with sock_tcp_type
   127     sock_stream_init(SOCK_TCP_BASE(*sock_ptr), &sock_tcp_type);
   127     sock_stream_init(SOCK_TCP_BASE(*sock_ptr), &sock_tcp_type);
   128 
   128 
       
   129     // invalid fds are <0
       
   130     (*sock_ptr)->fd = -1;
       
   131 
   129     // done
   132     // done
   130     return SUCCESS;
   133     return SUCCESS;
   131 }
   134 }
   132 
   135 
   133 err_t sock_tcp_init_fd (struct sock_tcp *sock, int fd)
   136 err_t sock_tcp_init_fd (struct sock_tcp *sock, int fd)