added channel api, TODO:make connection by using xhr.