/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
library/cpp/coroutine/engine/helper.h
15 строк
496 B
qkrorlqr
Initial NBS OpenSource export
28 апр 2023, 21:54
28 апр 2023, 21:54
783a858
Код
Авторство
О чём код?
#pragma once #include <util/generic/string.h> #include <util/datetime/base.h> namespace NCoro { // @brief check that address `host`:`port` is connectable bool TryConnect(const TString& host, ui16 port, TDuration timeout = TDuration::Seconds(1)); // @brief waits until address `host`:`port` became connectable, but not more than timeout // @return true on success, false if timeout exceeded bool WaitUntilConnectable(const TString& host, ui16 port, TDuration timeout); }