Table of Contents
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,
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.
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 ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.