Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

NPN_DestroyStream

This article needs a technical review. How you can help.

« Gecko Plugin API Reference « Plug-in Side Plug-in API

Summary

Closes and deletes a stream.

Syntax

#include <npapi.h>
 
NPError NPN_DestroyStream(NPP     instance, 
                          NPStream* stream, 
                          NPError   reason);

Parameters

The function has the following parameters:

instance
Pointer to current plug-in instance.
stream
Pointer to current stream, initiated by either the browser or the plug-in.
reason
Reason the stream was stopped so the application can give the user appropriate feedback. Values:
  • NPRES_DONE (most common): Stream completed normally; all data was sent by the plug-in to the browser.
  • NPRES_USER_BREAK: Plug-in is terminating the stream due to a user request.
  • NPRES_NETWORK_ERR: Stream failed due to network problems.

Returns

  • If successful, the function returns NPERR_NO_ERROR.
  • If unsuccessful, the plug-in is not loaded and the function returns an error code. For possible values, see Error Codes.

Description

The plug-in calls the NPN_DestroyStream() function to close and delete a stream. This stream can be either a stream that the browser created and passed to the plug-in in NPP_NewStream(), or a stream created by the plug-in through a call to NPN_NewStream().

See also

Document Tags and Contributors

 Contributors to this page: teoli, kscarfone, Sheppy, Mook, Pmash
 Last updated by: kscarfone,