LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to have two data socket on one PC?

Hello,

 

I'm creating simple Tic Tac Toe  online game. I have problem because i have only one PC and i can't write/test my program. Is there any way to create two data sockets on one PC? one for player A and one for player B with two different IP's??

 

And my second question:

If i player A use Localhost to write variable A=50 and then player B connect to plyer A IP's and read variable A he will get 50 right?

0 Kudos
Message 1 of 3
(2,571 Views)

Before you worry about getting your program to connect to two IPs, do you have it running "stand-alone" on your PC, with one set of controls that Player 1 and Player 2 both use (on their respective turns, of course) to make their move?  If not, get that working, then worry about how to host it and allow two players to connect.

 

Bob Schor

0 Kudos
Message 2 of 3
(2,558 Views)

This is my school project, and there is no ofline mode, this is why i need two data socket(2 different IP's) or two PC's. My idea which player starts first its simple:

 

default value = 0

- Player A choose number 1-100 and set it in localhost variable

- Read Player B variable

- if variables are the same back to begining

- if player A have bigger value -> player A starts first

 

Something like that, it dosent have to be PRO, even if it will stuck/bug once per 10 times its ok for me.

 

So i can't move one without 2 data sockets now, or without 2 PC's. I came up with idea to double localhost variables and ye it will work but i dont want to do it this way.

0 Kudos
Message 3 of 3
(2,545 Views)