void cellophane_init(WsHandler * ws_handler, int keepalive){ cellophane_handshake(ws_handler); cellophane_connect(ws_handler); if (keepalive) { cellophane_keepAlive(ws_handler); } }
int main() { WsHandler io_client; cellophane_io(&io_client,"http://", "localhost", 8000); cellophane_emit(&io_client,"login", "foo",""); cellophane_on(&io_client,"notofication", on_notofication_callback); cellophane_keepAlive(&io_client); cellophane_close(&io_client); return 0; }