I have written several Modbus client libraries for TCP/IP and serial communications - they are virtually the same. Not a single one of them was written for the specific environment I used. You will need to find one and adapt it for your use. The internet has lots of them. A search at DDG gives a pretty good list :
Modbus library at DuckDuckGo[
^]. Any written for C++ should get you pretty close unless your compiler's libraries use some weird socket stuff so it should not be difficult.
BTW - a protocol is a protocol. The language the server is written in is completely irrelevant.