Skip to content

How to keep the connection open without having to wait for getline ? #388

@jimver04

Description

@jimver04

Hi,

in my code I do not want to froze everything in order to wait for a getline.
If I comment the getline code as below then the connection ends although I haven't told so.

???

    bind_events();

    HIGHLIGHT("Event listeners binded :) \n")

 //    HIGHLIGHT(" - HINT: Type exit to stop HWs client")
 //    for (std::string line; std::getline(std::cin, line);) {
 //
 //         if (line == "exit")
 //         {
 //             HIGHLIGHT("Closing...")
 //
 //             client.sync_close();
 //             client.clear_con_listeners();
 //
 //             return 0;
 //         }   
 //    }
 // 	
	// return 1;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions