Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

Owo Sugiana / opensipkd-iso8583

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • opensipkd-iso8583
  • opensipkd
  • streamer
  • bni.py
  • Owo Sugiana's avatar
    Tambah streamer BNI · 59b7104a
    Owo Sugiana committed Sep 23, 2022
    59b7104a Browse Files
bni.py 374 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
from . import Streamer as BaseStreamer

# Berakhiran 2 byte berisi \r\n
# Network header BNI tidak memuat size data, praktis
# setiap request dianggap sebuah transaksi.

SUFFIX = b'\r\n'


class Streamer(BaseStreamer):
    def get(self, raw):
        t = raw.split(SUFFIX)
        self.raw = t[0]
        return self.raw

    def set(self, raw):
        return raw + SUFFIX