|
Socket Communication |
|
Step 3
Run both Projectors, and then press the button on the "Server" to send the message to the "Client" Projector. The message "Hello World" will be displayed in the Client Projector.
The Command in Step 2 sends the contents of the variable sMessage to the IP address specified (in this case 127.0.0.1 because we are testing it on a local server) and on the specified port number (in this case 4000).
It is important that the client projector is also "listening" to the correct port. If we had set the listen port in Step 1 to 4001, the communication would have failed, unless we sent the message to port 4001.