olehkulykov / fayecpp Goto Github PK
View Code? Open in Web Editor NEWFayeCpp (C++) lightweight, cross-platform client library for desktop & mobile platforms, such as Mac, Windows, Linux, iOS, Android.
License: MIT License
FayeCpp (C++) lightweight, cross-platform client library for desktop & mobile platforms, such as Mac, Windows, Linux, iOS, Android.
License: MIT License
Hi, it would be awesome if to add an option to include extra data on /meta/ messages. This would be helpful to perform validations and authorization on the server side.
Hi, I tried to compile fayecpp using visual studio 2012, the compiling went fine, but there are lots of linker error:
error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl FayeCpp::RELog::log(char const *,...)"....
and still lots of it. It seems the lib is not linked properly to my project, although I have put fayecpp.lib in my project's Linker-Input-Additional Dependencies.
Is there anything I'm missing? Thank you for great lib :)
I got onFayeTransportDisconnected
every 30 sec and can't figure out where is that came from,
It should be timeout I guess? Do I've to prevent this?
At present, I auto reconnect when it trigger, but I'm not sure it's best practice?
Thanks!
I'm try to use FayeCpp with actionhero on my local Mac which I think I've to tear this actionheroClient.js down and convert to cpp (am I right?), Far as I can go at present is onFayeTransportConnected
The question is it's possible to accomplish this? (Just to make sure I'm not wasting my time doing impossible things) Any hint is very welcome :D
Thanks
I have the feeling I don't understand anything about how this Faye business works. I don't have any issues with the javascript clients, but the FayeCpp client does things that I do not understand clearly.
I have a timeout of 30 seconds on my Faye server.
If I don't do anything in the 30 seconds that follow the transport connection, it will timeout, and I'll have to reconnect on my own if I want to do further operations. That's exactly what I expect, nothing strange here.
However, if I do something in the 30 seconds that follow the transport connection, it won't execute immediately: it will wait until those 30 seconds are over, then it will execute these operations (publishing, subscribing, receiving, etc) all at once, and the transport won't be timed out (which mean I can publish something else, but again, I'll have to wait 30 more seconds before the message actually gets published to the faye server).
Do I have to wake up FayeCpp's thread on my own ? Is it sleeping for the duration of the timeout ?
I have no idea what's happening to me, but that's my best guess for now.
I can reduce the timeout to 1 second, but that doesn't really fix the problem: a great deal of the messages I publish never reach their destinations when the timeout is 1 second. With the 30 seconds timeout, they all reach their destinations, but only once every 30 seconds.
This is the code of my faye server:
var http = require('http'),
faye = require('faye');
var server = http.createServer(),
bayeux = new faye.NodeAdapter({mount: '/', timeout: 30});
bayeux.attach(server);
server.listen(9292);
Hi, I tried running fayecpp on Android. Everything compiles smoothly but when I tried to connect to FayeCpp Client, I got this
Build fingerprint: 'htc_asia_wwe/htc_primou/primou:4.0.3/IML74K/92876.2:user/rel
ease-keys'
pid: 31352, tid: 31392 >>> com.company.mygame <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000064
Stack frame I/DEBUG (31316): #00 pc 00534d36 /data/data/com.slabgam
es.mygame/lib/libcocos2dcpp.so (ZN7FayeCpp9Transport11onConnectedEv): Routine
FayeCpp::Transport::onConnected() at D:\nodejs\FayeCpp\builds\android/jni/../../
../src/transport.cpp:86
Stack frame I/DEBUG (31316): #1 pc 00535a4a /data/data/com.slabgam
es.mygame/lib/libcocos2dcpp.so (ZN7FayeCpp9WebSocket21onCallbackEstablishedEv)
: Routine FayeCpp::WebSocket::onCallbackEstablished() at D:\nodejs\FayeCpp\build
s\android/jni/../../../src/websocket.cpp:117
Stack frame I/DEBUG (31316): #2 pc 00535b6a /data/data/com.slabgam
es.mygame/lib/libcocos2dcpp.so (ZN7FayeCpp9WebSocket12callbackEchoEP20libwebso
cket_contextP12libwebsocket29libwebsocket_callback_reasonsPvS6_j): Routine FayeC
pp::WebSocket::callbackEcho(libwebsocket_context, libwebsocket, libwebsocket_c
allback_reasons, void, void_, unsigned int) at D:\nodejs\FayeCpp\builds\android
/jni/../../../src/websocket.cpp:95
Stack frame I/DEBUG (31316): #3 pc 001ffb08 /data/data/com.slabgam
es.mygame/lib/libcocos2dcpp.so: Routine lws_client_interpret_server_handshake a
t libgcc2.c:?
Stack frame I/DEBUG (31316): #4 pc 002002d8 /data/data/com.slabgam
es.mygame/lib/libcocos2dcpp.so: Routine lws_client_socket_service at libgcc2.c:
?
Stack frame I/DEBUG (31316): #5 pc 001fbfec /data/data/com.slabgam
es.mygame/lib/libcocos2dcpp.so (libwebsocket_service_fd): Routine libwebsocket_
service_fd at ??:?
Stack frame I/DEBUG (31316): #6 pc 001fc134 /data/data/com.slabgam
es.mygame/lib/libcocos2dcpp.so (libwebsocket_service): Routine libwebsocket_ser
vice at ??:?
Stack frame I/DEBUG (31316): #7 pc 00535944 /data/data/com.slabgam
es.mygame/lib/libcocos2dcpp.so (_ZN7FayeCpp9WebSocket10threadBodyEv): Routine F
ayeCpp::WebSocket::threadBody() at D:\nodejs\FayeCpp\builds\android/jni/../../..
/src/websocket.cpp:332 (discriminator 1)
Stack frame I/DEBUG (31316): #8 pc 005343d2 /data/data/com.slabgam
es.mygame/lib/libcocos2dcpp.so (ZN7FayeCpp8REThread16invokeThreadBodyEPS0): R
outine FayeCpp::REThread::invokeThreadBody(FayeCpp::REThread*) at D:\nodejs\Faye
Cpp\builds\android/jni/../../../src/REThread.cpp:425
Stack frame I/DEBUG (31316): #9 pc 00534100 /data/data/com.slabgam
es.mygame/lib/libcocos2dcpp.so (ZN7FayeCpp16REThreadInternal14threadFunctionEP
v): Routine FayeCpp::REThreadInternal::threadBody() at D:\nodejs\FayeCpp\builds
android/jni/../../../src/REThread.cpp:94
Stack frame I/DEBUG (31316): #10 pc 00013494 /system/lib/libc.so (
_thread_entry)
Stack frame I/DEBUG (31316): #11 pc 00012fcc /system/lib/libc.so (p
thread_create)
Everything runs good on Windows though.
Could you help me please? I have no idea what's wrong with it.
Thank you
Hi, I have played with FayeCpp for a while now. I always get random crash when I'm trying to unsubscribeFromChannel and sendMessageToChannel. Have you tested the library or use it in production level? Is there any problems or bugs related with this?
Thank you
Followed instructions.
I can give the full logs sometime if it helps, but maybe this is an obvious problem? Same problem on both my Mac installs.
In file included from /Users/slava/FayeCpp/src/websocket.cpp:24:
In file included from /Users/slava/FayeCpp/src/websocket.h:38:
In file included from /Users/slava/FayeCpp/libwebsockets/lib/libwebsockets.h:31:
/Users/slava/FayeCpp/build/libwebsockets/lws_config.h:128:9: warning: 'HAVE_UNISTD_H' macro redefined
#define HAVE_UNISTD_H
^
/Users/slava/FayeCpp/build/fayecpp_config.h:157:9: note: previous definition is here
#define HAVE_UNISTD_H 1
^
9 warnings generated.
Linking CXX shared library libfayecpp.dylib
Undefined symbols for architecture x86_64:
"_ERR_remove_thread_state", referenced from:
_lws_ssl_destroy in libwebsockets.a(ssl.c.o)
_lws_ssl_context_destroy in libwebsockets.a(ssl.c.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libfayecpp.dylib] Error 1
make[1]: *** [CMakeFiles/fayecpp.dir/all] Error 2
make: *** [all] Error 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.