Skip to content

Calling "" recursively? #1

@brmarkus

Description

@brmarkus

In "https://github.com/sachinsaini4278/Socket-Programming-using-boost-asio/blob/master/SynClientHeartbeat.cpp#L32":

sleepThread(sock); //call recursively 

Wouldn't this let the used stack grow "forever"...? Imagine a server with an heartbeat every 1s or 500ms, letting the server run 24/7?

Could you imagine to e.g. use a (boost-)timer or a (boost-)signal instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions