Table of Contents
stream_close
Closes the stream.
Description
This function closes the stream. All resources associated with the stream are freed.
Prototype
t_error stream_close(t_stream stream);
Parameters
t_stream stream
A stream established using stream_listen, stream_connect or stream_accept.
Return value
Returns 0 on success. If an error occurs then a negative error code is returned.
Error codes
This function does not return any error code.
Requirements
Include Files |
Libraries |
---|---|
quanser_stream.h |
quanser_communications.lib;quanser_runtime.lib;quanser_common.lib |
Examples
const char uri[] = "shmem://foobar:1"; const t_boolean nonblocking = false; const t_int send_buffer_size = 8000; const t_int receive_buffer_size = 8000; t_stream server; t_stream client; result = stream_listen(uri, nonblocking, &server); if (result == 0){ ... result = stream_accept(server, send_buffer_size, receive_buffer_size, &client); if (result == 0){ ... stream_close(client); } }
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.