示例#1
0
void cellophane_init(WsHandler * ws_handler, int keepalive){

    cellophane_handshake(ws_handler);
    cellophane_connect(ws_handler);
    if (keepalive) {
        cellophane_keepAlive(ws_handler);
    }
}
int  cellophane_init(WsHandler * ws_handler, int keepalive){

	int ret;
	
    ret = cellophane_handshake(ws_handler);
	if(ret <= 0 ){
		cellophane_print_log(ws_handler, LOG_ERROR, DEBUG_NONE, "Init failed no response from curl");
		return 0;
	}
    cellophane_connect(ws_handler);
    /*if (keepalive) {
	  cellophane_keepAlive(ws_handler);
	  }*/
	return 1;
}