Here is the code for connecting Simulink Desktop Real-Time™ and a C++ program using connectionless UDP. WinSock2 is used in C++.https://github.com/mahyaret/Matlab-Real-Time