Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Telegram Client in C [closed]

I am in the process of investigating a Telegram client in C so that I can write a client for the Pebble smartwatch/s. I understand the Pebble side, and all of the Telegram methods shown here, but I have absolutely no clue how to send those in C.

I figure it has something to do with a "TL Language" and the MTProto service, but I think this stuff is beyond my current understanding. I also found this collection of code but again, no clue how to use it https://github.com/vysheng/tgl/.

EDIT 1:

A C-based app with a PebbleKitJS section running on the phone seems like the best route for this. Any help on implementing MTProto with JS?

like image 377
Felix Johnson Avatar asked May 27 '16 21:05

Felix Johnson


1 Answers

You have 128KB of RAM on a Pebble, attached to an ARM Cortex M3 or M4.

This means that all your request must fit within 128KB, alongside with an HTTP implementation, an encryption implementation, the respective encryption key and things like whatever you want to keep in memory (contact list, message history, etc).

Frankly, that will not work, and the C programming language is not your problem here, it's that an HTTP-based encrypted protocol is not what you want to run off 128KB RAM.

Since your Pebble has no internet connectivity on its own, you'd need an application running on a smartphone (or any other bluetooth device) that talks to your Pebble – let that be your Telegram client, and just show notifications on your smartwatch.

like image 111
Marcus Müller Avatar answered Oct 05 '22 05:10

Marcus Müller