Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Creating a TCP Server

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Complete the following steps to create a TCP server using the TCP functions.

  1. Use the TCP Listen VI or the TCP Create Listener and TCP Wait On Listener functions to wait for a connection. You must specify the port and optionally a service name. This port or service name must be the same port or service name that the client attempts to access.
    • TCP Listen VI
    • TCP Create Listener Function
    • TCP Wait On Listener Function
  2. If a connection is established, use the TCP Write function to send a message to the client. The data must be in a form that the client can accept.
  3. Use the TCP Read function to read a message from the client.
  4. Use the TCP Close Connection function to close the connection.

Refer to the following VIs for examples of a TCP server:

  • Data Communication\Protocols\TCP\TCP Named Service\TCP Named Service.lvproj


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit