Skip to main content
iso8583sim.net.client

ISO8583Client

Send requests to an ISO 8583 host over TCP. Responses are matched to requests by STAN (field 11), so several requests can be in flight on one connection at once. Example
Parameters
str
required
Host name or address
int
required
TCP port
WireFormat | None
default:"None"
Byte layout of messages (defaults to ASCII with a binary bitmap)
Framing | None
default:"None"
Length header and optional TPDU (defaults to a 2-byte binary header)
float
default:"10.0"
Seconds to wait for a response
ssl_module.SSLContext | bool | None
default:"None"
True or an SSLContext to connect over TLS
ISO8583Version
default:"ISO8583Version.V1987"
ISO 8583 version used to decode responses

connect()

Open the connection. send() also connects on demand.

close()

Close the connection. Requests still waiting fail with ConnectionError.

send()

Send a request and return the matching response. Parameters
ISO8583Message
required
Request message. It must have a STAN (field 11).
float | None
default:"None"
Seconds to wait for the response (defaults to the client timeout)
ISO8583Message
The decoded response
Raises
  • TimeoutError: No response arrived in time
  • ConnectionError: The connection closed before the response arrived