Closed aimproxy closed 4 years ago
Hi, nice!
tls.connect
returns a socket in where you can send bytes with write
method.
Cipher is 'AES128-SHA256' (RSA key exchange and AES encryption) it is suite. You can't choose one Or other. They works in combination.
Buffer(packet, 'hex')
creates a buffer using a hex string source.
the buffer contains bytes for a special packet in mqtt protocol http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html http://www.steves-internet-guide.com/mqtt-protocol-messages-overview/
let me know if you need something else
Thanks
@koalazak Hi again, just one more thing, a question for a newbie programmer. There is a buffer in C like on NodeJS? and the variable packet is a hex string right? and that hex string will be encoded to a byte array right?
Hi, I'm translating your code to Vala to use in (Home App)[https://github.com/manexim/home] for elementary OS, so we creating a library to translate ur code to Vala (libirobot)[https://github.com/manexim/libirobot].
I have some question about ur code, take a look below:
Here, nodejs etablish a TLS connection with cipher, whats is the value returned from
tls.connect
?, ciphers should beAES128
orSHA256
?, aboutclient.write
whats this function do? andBuffer(packet, 'hex')
is to convert hex to bin?