From 824b078eaccf3e26c8416e5f0f044f1c0eb23e10 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Fri, 18 Jun 2021 13:48:12 +0200 Subject: [PATCH] Simpler stream connection protocol. --- stream.prs | 22 +++++++--------------- tcp.prs | 2 -- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/stream.prs b/stream.prs index a565087..a8c7ecc 100644 --- a/stream.prs +++ b/stream.prs @@ -1,24 +1,14 @@ version 1 . embeddedType EntityRef.Ref . -; Assertions +; Assertion: StreamConnection = . -StreamSpecListenable = . -StreamSpecConnectable = . -; Assertion -StreamListener = . +; Assertions: +StreamListenerReady = . +StreamListenerError = . -; Assertion -StreamConnect = . - -; Assertion -ConnectionHandler = - / @connected - / @rejected -. - -; Assertion +; Assertion: StreamError = . Source = @@ -40,7 +30,9 @@ Sink = / . +; Value: CreditAmount = @count int / @unbounded =unbounded . +; Value: Mode = =bytes / @lines LineMode / / . LineMode = =lf / =crlf . diff --git a/tcp.prs b/tcp.prs index b00df01..7a6d5e1 100644 --- a/tcp.prs +++ b/tcp.prs @@ -5,5 +5,3 @@ TcpRemote = . TcpLocal = . TcpPeerInfo = . - -TcpListenError = .