Skip to content

Commit

Permalink
Renamed separator to terminator
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeHudsonDLS committed Nov 22, 2024
1 parent 62b74a1 commit 3e62b7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tickit/adapters/io/tcp_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ class TcpIo(AdapterIo[CommandAdapter]):
host: str
port: int

def __init__(self, host: str, port: int, separator: str | None = None) -> None:
def __init__(self, host: str, port: int, terminator: str | None = None) -> None:
self.host = host
self.port = port
self.separator = separator
self.terminator = terminator

async def setup(
self, adapter: CommandAdapter, raise_interrupt: RaiseInterrupt
Expand Down Expand Up @@ -80,9 +80,9 @@ async def reply(replies: AsyncIterable[Optional[bytes]]) -> None:
tasks.append(asyncio.create_task(reply(on_connect())))

while True:
if self.separator is not None:
if self.terminator is not None:
data: bytes = (
await reader.readuntil(separator=self.separator.encode())
await reader.readuntil(separator=self.terminator.encode())
)
else:
data: bytes = await reader.read(1024)
Expand Down

0 comments on commit 3e62b7c

Please sign in to comment.