I have developed VI using data socket for 2 PC communication.It runs fine if both VI are on same PC .But not run when both VI are in different PC..
Look at my attached VI and data socket server manager setting...
Defaulreader = everyhost
Did you change 'localhost' to 'everyhost' as a string in the configuration window?
I would have expected the format to be an asterisk (*) character to indicate that any host is allowed to read/write.
(Also...there's no VI attached)
Which computer are you using as the Data Socket server? You need to change the IP address in your VIs to point to the IP address of the DataSocket server. "localhost" refers to the local machine so it will be always trying to connect to the server running on the computer you run it from.
You were right with 'everyhost'...that should allow any computer to connect (even though it is completely different to all other IP access restrictions that NI use which is to use an asterisk as a wildcard to indicate anyone can connect).
In your VIs...you have a string which is the datasocket URL. You need to change the 'localhost' part to the IP address of the datasocket server (unless the datasocket server is running on the same PC as the VI in which case localhost is correct).