| Contents | Index |
echotcpip('state',port)
echotcpip('state')
'state' | Turn the server on or off. |
port | Port number of the server. |
echotcpip('state',port) starts a TCP/IP server with port number specified by port. state can only be on.
echotcpip('state') stops the echo server. state can only be off.
Shows how to set up an echo server.
Start the echo server on port 4000 and create a TCPIP object.
echotcpip('on',4000) t = tcpip('localhost',4000);
Connect the TCPIP object to the host.
fopen(t)
Shows how to communicate with the echo server.
Write to the host and read from the host.
fprintf(t,'echo this string.')
data = fscanf(t);Display the read data.
data
The string is returned.
data = echco this string.
Shows how to dismiss an echo server.
Stop the echo server and disconnect the TCPIP object from the host.
echotcpip('off')
fclose(t)
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |