TCP/IP Communication
Transmission Control Protocol (TCP) is a transport protocol layered on top of the Internet Protocol (IP) and is one of the most used networking protocols. MATLAB® support for TCP/IP client communication enables you to use network socket communication to connect to remote hosts from MATLAB for reading and writing both binary and ASCII data.
Use tcpclient
to
create a TCP/IP client that connects to a server or hardware and perform read and write
operations.
Functions
Apps
TCP/IP Explorer | Connect to and communicate with TCP/IP server (Since R2021b) |
Hardware Manager | Discover and get started with your hardware (Since R2022a) |
Topics
- TCP/IP Communication Overview
Use network socket communication to connect to remote hosts from MATLAB for reading and writing data over TCP/IP.
- Create TCP/IP Client and Configure Settings
Connect to remote hosts or hardware from MATLAB for reading and writing data over TCP/IP.
- Use Callbacks for TCP/IP Communication
Enhance TCP/IP communication by executing a callback function when a specified event occurs.
- Write and Read Data over TCP/IP Interface
Write and read data to and from the remote host connected to the
tcpclient
object. - Configure Connection in TCP/IP Explorer
Specify the server to connect to in the TCP/IP Explorer app.
- Get Started with Hardware Manager
Get the apps and add-ons to access your hardware from MATLAB.
Troubleshooting
Troubleshooting TCP/IP Client Interface
Troubleshoot the TCP/IP client interface.
Resolve TCP/IP Client Connection Errors
Troubleshoot creating a TCP/IP client.
Resolve TCP/IP Client Warning: Unable to Read Any Data
Troubleshoot when you receive no data and you get the warning message: 'tcpclient' unable to read any data.