BenPope/pusher-cpp

example client doesn't work

cromatikap opened this issue · 2 comments

Hi there.

$ ./pusher++-client --key de504dc5763aeef9ff52

pusher++-client: /home/axel/git/pusher-cpp/rapidjson/rapidjson/include/rapidjson/document.h:1681: const Ch* rapidjson::GenericValue<Encoding, Allocator>::GetString() const [with Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator<>; rapidjson::GenericValue<Encoding, Allocator>::Ch = char]: Assertion `IsString()' failed.
[1]    21727 abort (core dumped)  ./pusher++-client --key de504dc5763aeef9ff52

the key stem from https://www.bitstamp.net/websocket/ and works well in javascript

Thanks for the report. I haven't forgotten about this, my primary machine is currently dead.

OK, the problem is essentially that mt1 is considered the default cluster, but I have eu set as the default in the example app. Also, error handling is non-existent.

I've changed the default to mt1 as the other SDKs.

The example client and server were designed only to talk to one another, but I've pulled out some hardcoded values, so now you can specify the channel to subscibe:

Update the repo, rebuild and try this:

./pusher++-client --cluster=mt1 --key de504dc5763aeef9ff52 --channel=order_book