LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

STM vs shared variable

Solved!
Go to solution

In my case, you may need multiple simultaneous connections between computers A & B, so each client will need its own port. i think i'm going to use one port to accept connection requests and it'll respond with the port that should be used.

0 Kudos
Message 11 of 13
(600 Views)

@soupy wrote:

In my case, you may need multiple simultaneous connections between computers A & B, so each client will need its own port. i think i'm going to use one port to accept connection requests and it'll respond with the port that should be used.


Not intended as criticism of your design, just for information: multiple connections between the same client and server computer do not require multiple ports on the server.  The client will use multiple ports - one per connection - but you don't have to worry about that, the operating system takes care of it.  You can open multiple connections to the same port on the server regardless of whether the source is one computer or several.  I think the multiple ports approach will be more complicated, you'll have to worry about issues like what to do if a client connects, receives a port number, and then never establishes a connection on that port - will it hold that port open, listening forever for a connection?

0 Kudos
Message 12 of 13
(596 Views)

Criticism is totally accepted! I wasn't aware that it worked this way. I'll use your approach when i get the time to test it out. thanks!

0 Kudos
Message 13 of 13
(594 Views)