added connection handler & text protocol