Added logic for initialing connection to streaming endpoint

Signed-off-by: rpgmaker <olamide.bakre@gmail.com>