E-Prime 18.104.22.168 and beyond supports both Sending and Receiving of TCP and UDP data.
Samples of supported Socket communication can be found in the ZIP below. Note that the instructions for running the experiments can be found in the expeirment (.es3) file's ReadMe InLines.
The EPrimeSocketDeviceTest.exe should be launched and configured prior to running the E-Prime expeirment. Make sure you also provide the application with the appropiate firewall permissions.
By default the experiments are configured to be ran locally on a single machine using localhost (127.0.0.1).
Additional information on receiving UDP data in E-Prime: E-Prime 3.0 requires a Global StartupInfo parameter for each machine that runs E-Prime 3.0 with UDP sockets. This can also be set in the StartupInfo prompts (as demonstrated in the sample).
For example, if we have a hostname of PST123 and an IP address of 192.168.1.100, we would create a global startupinfo entry of the following on the PST123 (i.e. the host machine; not the machine you are talking to).
Socket.UDPRecvServer = PST123
When given PST123, WinSock will attempt to resolve the hostname to an IP address and then bind one of the network interfaces to that IP. If you have a dynamic IP address, just putting your hostname as the receive server will make sure that you always retrieve the correct IP.
Note that this only works if the Socket Device is named Socket. If you start using multiple Socket Devices, you will need corresponding entries for each Socket Device (e.g. Socket2.UDPRecvServer).
If the hostname resolution fails, you can enter your IP address into the startupinfo.
To enable fully functional UDP sockets in E-Prime 3.0, you must set Socket.UDPRecvServer = hostname. If you do this, UDP sockets can be received without sending first, and they can receive UDP packets from other machines.
The hostname is just used to figure out which local network interface is used to receive packets. If testing locally, you may use 127.0.0.1 as defined in the sample.
PST highly-recommends the use of packet sniffers such as WireShark (http://www.wireshark.org/) for debugging network communications.
This article applies to: