Create and connect to an endpoint using separate functions. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>