quanser.communications.stream.listen
Creates a listening stream.
stream = quanser.communications.stream.listen(uri, nonblocking)
stream = quanser.communications.stream.listen(uri) % blocking listening stream
Creates a listening stream. The communication protocol, hostname, port and options are specified via the first argument, which takes the form of a Universal Resource Identifier (URI). For example, 'tcpip://localhost:18000' indicates that the stream should use the TCP/IP protocol and listen on port 18000. Likewise, 'shmem://mymemory:1' indicates that the stream should use the shared memory protocol and listen to shared memory 'mymemory' and port 1. Refer to the help on Universal Resource Identifiers or the Stream Listen block for Simulink for more information.
Streams are normally blocking. Specify nonblocking as true
to create a non-blocking listening stream. Specify nonblocking as false
to create a blocking listening stream. A blocking listening stream does not return from a accept call until a
connection from a client has been accepted. A non-blocking listening stream does not block in accept but always return
immediately. See
accept for details.
When finished with the stream, the stream must be closed with close or quanser.communications.stream.close_all.
uri
A string containing the URI. eg. 'tcpip://quanser-dev:18000' or 'shmem://comm_server:1'.
nonblocking
A boolean indicating whether the stream is nonblocking (true or 1) or blocking (false or 0).
stream
A handle to the listening stream for use with the other Quanser Stream functions.
stream = stream_listen('tcpip://localhost:18000'); % Listen on TCP/IP port 18000 ... stream_close(stream); % Close the stream to release resources
See Also
Copyright ©2025 Quanser Inc. This page was generated 2025-06-17. "
Submit feedback to Quanser about this page.
Link to this page.