2 Top level functions for parsing and storing information.
4 2011, Razvan Deaconescu, razvan.deaconescu@cs.pub.ro
10 def parse_store_session(writer, parser, session_id):
12 Parse and store information for a BitTorrent session.
14 writer is an instance of the storage.SwarmWriter class.
15 parser is an instance of the parsing.LogParser class (may be
16 LibtorrentLogParser, TriblerLogParser or some other).
17 session_id is the client session id.
21 msg = parser.get_next_message()
22 # In case of no more messages, exit loop.
26 msg.set_client_session_id(session_id)
27 writer.add_message(msg)