Connecting to eSocket from native macOS. (running eSocket on a local Windows OS Virtual Machine)¶
Preface
ACI's eSocket service can only exist/run on a Windows environment. It may be desirable to continue your development from your macOS environment instead of recreating your environment on the Windows VM.
This tip will explain how to configure your Mac and Windows VM to communicate with each other in order to avoid developing from your VM environment, which typically will have a large performance difference compared to your macOS environment.
I achieved this by using the virtual machine software "Parallels" with Windows 11 installed.
This guide assumes the following:
You have completed the installation of eSocket on the Windows virtual machine and have restarted it so all current config has been downloaded.
You can successfully connect to eSocket/communicate via XML messages over port 4000 on the Windows environment.
How to configure Parallels
Parallels has a built-in user-friendly tool that helps configure port-forwarding, accessed by clicking the Parallels icon in your mac's top toolbar
Navigate to Parallels > Preferences > Network
Click the '+' towards the bottom of this sub-menu
Add the following rule: {Protocol: TCP, Source port: 4000, Forward to: Windows 11, Destination port: 4000}
Click "OK"
Now open up "Windows Defender Firewall with Advanced Security".
We will need to add a rules to both "Inbound Rules" and "Outbound Rules" in the left sub-menu's.
Click either menu ("Inbound Rules" or "Outbound Rules"), and click "New Rule" on the panel on the right-side. The following window should pop up:
Select "Port" then click "Next".
On the following screen, "TCP" will be selected by default, leave it as TCP.
Enter "4000" in the field "Specific local ports", see picture below
Click "Next", which will take you to the following page.
Keep "Allow the connection" selected and click "Next", taking you to the following page:
You can select whichever options you like. Take into account your own security concerns over potentially allowing "Public" network locations.
Click "Next", which will take you to the following page.
Give your Inbound/Outbound port rule a descriptive Name and Description.
Click "Finish".
Repeat steps viii through xvii (steps 8 through 17) for the other menu ("Inbound Rules" or "Outbound Rules").
That's it! You should be able to send/receive messages from your local VM to your Mac environment.