indexing description: "Message transport module" license: "MIT license (see ../../license.txt)" author: "Beat Strasser " date: "$Date$" revision: "$Revision$" deferred class P2P_MESSAGE_TRANSPORT inherit P2P_MODULE redefine init end feature {NONE} -- Initialization init (group: P2P_PEERGROUP; id: P2P_ID; advertisement: like implementation_advertisement) is -- Initialize module do Precursor (group, id, advertisement) endpoint_service := group.endpoint_service end feature -- Access name: STRING is -- Protocol name deferred end local_address: P2P_ENDPOINT_ADDRESS -- Locals peer Endpoint address for this transport feature -- Basic operations start (args: ARRAY [STRING]) is -- start module do if module_status = initializing then -- register this transport at endpoint service endpoint_service.extend_message_transport (Current) end module_status := start_ok end suspend is -- Suspend module do module_status := suspended end stop is -- stop module do -- unregister transport service endpoint_service.prune_message_transport (Current) module_status := stop_ok end feature {NONE} -- Implementation endpoint_service: P2P_ENDPOINT_SERVICE check_dependencies (a_parent: P2P_PEERGROUP): BOOLEAN is -- Are all needed dependencies met? do Result := a_parent.endpoint_service /= Void end end