You are not logged in.
I would like to create my own application (instead of the one delivered by a vendor) that communicates with a proprietary system.
They are using a custom/proprietary TCP protocol, but luckily I have a Wireshark dissector for it.
My question is if anyone can give me some hints/tips/starting points in how to achieve this in mORMot2?
My guess is that I will spend a lot of time in mormot.net.sock unit but if someone has a public repo or an example of how one defines custom TCP header, message length bytes etc.. it would be really helpful.
Thanks,
+adnan
Offline
In mormot.net.sock you have a TCP client as TCrtSocket class.
In mormot.net.async you have an event-driven TCP server as TAsyncServer class.
You just need to inherit your own processing class from TAsyncConnection, and overwrite the OnRead method.
See mormot.net.rtsphttp for a sample of how to deal with a proprietary TCP protocol.
Note that THttpAsyncConnection/THttpAsyncServer are also an example of TAsyncServer implementation with a custom TCP protocol, which is HTTP.
Offline
Thanks Arnaud!
Indeed, HTTP is a prime example of a custom TCP protocol
Offline