View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Steffen Ullrich > Net-IMP-Remote-0.007 > Net::IMP::Remote::Protocol



Annotate this POD


View/Report Bugs
Source   Latest Release: Net-IMP-Remote-0.009


Net::IMP::Remote::Protocol - protocol description for IMP RPC


Basic Ideas

Messages from Data Provider to IMP RPC Server


This exchanges the version of the protocol spoken. It is the first operation of IMP RPC server after a new client connected. The client will verify the version and close if it cannot speak it.

get_interface( list<data_type, list<result_type>> provider_ifs )

This sends the interface supported by the data provider and returns the matching interfaces from the IMP plugins inside the IMP RPC server. It's the only synchronous operation, expecting a interface message back. It will be called after establishing the connection, before any analyzers are created.

set_interface( <data_type, list<result_type>> provider_if )

This will be called by the data provider to fix the interface to the given one. If this given interface is not supported an exception will be generated asynchronously. But this should usually not happen, because the supported interfaces were queried before with get_interface. This function should be called after get_interface and before creating analyzers.

new_analyzer( analyzer_id, hash context )

This will create a new analyzer. The uniq integer analyzer_id will be created by the data provider, so that the operation can be done asynchronously. The analyzer_Id will be used in subsequent data, result or exception calls in the context of the new analyzer. The analyzer_id should not be 0. The context is expected as a hash with string keys and string values.

If the IMP plugin is not interested in analyzing data inside the given context it can simply send IMP_PASS for both directions with offset set to IMP_MAX_OFFSET.

delete_analyzer( analyzer_id )

This will cause the deletion of the analyzer with the given analyzer_id.

data( analyzer_id, dir, offset, data_type_id, char data[] )

This will send data from the data provider into the IMP plugin. For the meaning of the parameters see Net::IMP interface.

Messages back from IMP RPC Server

exception(analyzer_id, char msg[])

This notifies the data provider about problems with the given analyzer, which will usually result in closing the analyzer. If analyzer_id is 0 it will be interpreted as an exception for the whole factory and the factory including all analyzers should better shut down.

interface( list<data_type, list<result_type>> analyzer_ifs

This is the reply message to a get_interface message from the data provider.

result( analyzer_id, result_type, ... )

This will return the result for processing data. The arguments following the result_type are specific to the type, e.g.

syntax highlighting: