-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make a natural language spec of the FB protocol? #145
Comments
Not sure what you had in mind there, but whatever it is, it's not a problem The only reason there are no docs is that no docs have been written |
Honestly, I'm not sure either. I'm trying to decipher the C code, but I'm not sure where to start. I wanted to start documenting how FB's MQTT API works. |
Get an editor that lets you jump through functions easily (I personally use vim with Then jump like fb_api_connect -> fb_mqtt_open -> fb_mqtt_cb_open -> fb_api_cb_mqtt_open. Figure out how those functions call each other and how signals work, then extrapolate the pattern to the rest. Complement with debug output of actually running the thing, the hexdumps help a lot. Most of the meat is in facebook-api.c. -data.c is generic storage, -http.c is a generic http client wrapper, -json.c is a generic json library wrapper, -mqtt.c is a generic (probably standard) mqtt implementation, -thrift.c is a generic compact thrift serializer and -util.c is generic garbage. facebook-api.h has important stuff too. Also some constants in facebook-mqtt.h. |
@dequis Thanks for the information. Your website helped. I will get my editor - Emacs - to use ctags to jump through the functions later, once my exam is over today. I guess the next big step is to figure out the model that Thrift uses, from what I've seen on your website? |
Update: I'll be honest, I haven't got very far with this. Apologies. |
I tried to connect to |
Just had an idea. What would be the feasibility of creating a natural language specification of the FB Messenger protocol, for those who need a quick reference without having to delve into the C code?
Of course, I foresee that this may not be possible, because of FB's T&Cs, but I thought I'd ask anyway.
Thanks.
The text was updated successfully, but these errors were encountered: