Cool, does it also have apis for accepting incoming connections (server mode) and customizing the size of the message message length field (e.g. 4 byte instead of 2)?
Currently implementing electrum protocol via bolt 8 (in electrum client/electrumx server) for secure connections without SSL, your lnsocket library could may be used by electrs, bdk etc to implement this too without having to write bolt8.