Skip to content
This repository was archived by the owner on Jun 22, 2021. It is now read-only.
This repository was archived by the owner on Jun 22, 2021. It is now read-only.

how to replace callback for the same readable io event #151

@hezhanbang

Description

@hezhanbang

i want to read the first data from one tcp connection in function on_tcp_firstRead, then i want to use another function to read the rest of data in the same tcp connection. what functions should i use?

i have try those functions below, it fail:
ret = uv_read_start((uv_stream_t*)tcp_sock, alloc_buffer, on_tcp_firstRead); //read the frist segment in tcp
...
ret = uv_read_start((uv_stream_t*)tcp_sock, alloc_buffer, on_tcp_common_Read); //read the rest of same tcp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions