TCP Server
Configure TCP server

Libraries:
Simulink Real-Time /
IP
Description
The TCP Server block configures a TCP server.
Examples
Target to Development Computer Communication by Using TCP
Use TCP blocks to send data from the target computer to MATLAB running on the development computer.
Ports
Input
If Enable
is greater than zero, the block connects to the Ethernet
device. Otherwise, the block does not
connect to the Ethernet device.
Output
The status value is one of:
0
— Not connected1
— Connected
As a best practice, connect the Status
output
of a TCP configure block to the Enable
input of
the associated TCP Send and TCP Receive blocks.
Parameters
Dependency
When you select this parameter, it deactivates the Server IP
address parameter and excludes the ports
1
through 1023
and
5500
through 5560
from use by
TCP.
Programmatic Use
Block Parameter:
useHostTargetConn |
If you are using a dedicated Ethernet card, this value must match the IP address configured for the Ethernet card on the target computer.
Programmatic Use
Block Parameter:
serverAddress |
The combination of Server IP address and Server port must be unique.
Ports 1
through 1023
and
5500
through 5560
are reserved for Simulink Real-Time
communications.
Programmatic Use
Block Parameter:
serverPort |
Enables Nagle's algorithm to improve the efficiency of the TCP/IP network. Nagle's algorithm reduces the number of packet that are sent over the network. The tradeoff for this improved efficiency is that Nagle's algorithm introduces a delay before a packet is sent over the network. You can reduce network latency by disabling Nagle's algorithm for this block.
Programmatic Use
Block Parameter:
useNaglesAlgorithm |
Version History
Introduced in R2020bYou can reduce network latency (and reduce network efficiency) by disabling Nagle's algorithm for the TCP Client block and TCP Server block. For more information, see the Use Nagle's algorithm block parameter.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)