rtIOStreamClose - Shut down communications channel - MATLAB (original) (raw)
Main Content
Shut down communications channel
Syntax
Description
[errFlg](#d126e41866) = rtIOStreamClose([streamID](#d126e41842))
shuts down the communications channel and cleans up associated resources.
Examples
Close Communications Channel
This code from [rtiostreamtest.c](https://mdsite.deno.dev/matlab:edit%28fullfile%28matlabroot,'/toolbox/coder/rtiostream/src/rtiostreamtest/rtiostreamtest.c'%29%29)
detects errors when closing the communications channel.
static int closeServer(void) { const int errorOccurred = rtIOStreamClose(streamID); if (errorOccurred == RTIOSTREAM_ERROR) { return errorOccurred; } return RTIOSTREAM_NO_ERROR; }
Input Arguments
Handle to the stream returned by a previous call tortIOStreamOpen
.
Output Arguments
If the function runs without errors, it returns zero. Otherwise, it returns -1.
The rtiostream.h
file defines these macros:
#define RTIOSTREAM_ERROR (-1) #define RTIOSTREAM_NO_ERROR (0)
Version History
Introduced in R2009a