# Implementing subscriber functionality

The functionality of a new subscriber depends very much on the data you actually want to process. Here are some things the Protosubscriber example code includes:

- Routine to process arriving data chunks

- Routine to set the status bits of a given channel

- Routine to return the status bits of a given channel

- Routine to perform an arbitrary subscriber defined action

- Routine to close down an open subscription

- Routine to start all channels for this subscription

- Routine to stop all channels for this subscription

- Routine to flush all data waiting and/or queued under the assumption that we have just arrived at a branch point and should be ready to deal with all new data from an entirely different part of the stream

- Routine to take action on end of file condition

- Routine to kill all output, return all queued buffers, and generally stop everything. Should return all channels to pre-initialized state.