src/sock.c
changeset 12 4147fae232d9
parent 11 14e79683c48c
child 28 9c1050bc8709
equal deleted inserted replaced
11:14e79683c48c 12:4147fae232d9
    72 const struct error_info* sock_stream_error (struct sock_stream *sock)
    72 const struct error_info* sock_stream_error (struct sock_stream *sock)
    73 {
    73 {
    74     // return pointer
    74     // return pointer
    75     return SOCK_ERR(sock);
    75     return SOCK_ERR(sock);
    76 }
    76 }
       
    77 
       
    78 void sock_stream_invoke_callbacks (struct sock_stream *sock, short what)
       
    79 {
       
    80     if (what & EV_READ && sock->cb_info->on_read)
       
    81         sock->cb_info->on_read(sock, sock->cb_arg);
       
    82 
       
    83     if (what & EV_WRITE && sock->cb_info->on_write)
       
    84         sock->cb_info->on_read(sock, sock->cb_arg);
       
    85 }