Module: Smartcard::Iso::JcopRemoteServingStubs
- Defined in:
- lib/smartcard/iso/jcop_remote_server.rb
Overview
Stubs out the methods that can be implemented by the serving logic in a JCOP remote server. Serving logic classes should mix in this module, to avoid having unimplemented methods.
Instance Method Summary collapse
-
#connection_end ⇒ Object
Called when a client connection is closed.
-
#connection_start ⇒ Object
Called when a client connection accepted.
-
#exchange_apdu(apdu) ⇒ Object
Serving logic handling an APDU exchange.
Instance Method Details
#connection_end ⇒ Object
Called when a client connection is closed.
This method serves as a notification to the serving logic implementation. Its return value is discarded.
29 30 31 |
# File 'lib/smartcard/iso/jcop_remote_server.rb', line 29 def connection_end nil end |
#connection_start ⇒ Object
Called when a client connection accepted.
This method serves as a notification to the serving logic implementation. Its return value is discarded.
21 22 23 |
# File 'lib/smartcard/iso/jcop_remote_server.rb', line 21 def connection_start nil end |
#exchange_apdu(apdu) ⇒ Object
Serving logic handling an APDU exchange.
:call-seq:
logic.exchange_apdu(apdu) -> array
The |apdu| parameter is the request APDU, formatted as an array of integers between 0 and 255. The method should return the response APDU, formatted in a similar manner.
41 42 43 44 |
# File 'lib/smartcard/iso/jcop_remote_server.rb', line 41 def exchange_apdu(apdu) # Dumb implementation that always returns OK. [0x90, 0x00] end |