OpenSource client:
https://github.com/MrAntares/roBrowserLegacy
https://github.com/guilhermelhr/unityro
https://github.com/vE5li/korangar
https://github.com/OpenKore/openkore
Basically its a tcp connection where server and client send binary messages to each other.
Every message is a packet and every packet has ID and Body
https://github.com/rathena/rathena/wiki/Packets