Simpler stream connection protocol.

This commit is contained in:
Tony Garnock-Jones 2021-06-18 13:48:12 +02:00
parent cf93327ed6
commit 824b078eac
2 changed files with 7 additions and 17 deletions

View File

@ -1,24 +1,14 @@
version 1 .
embeddedType EntityRef.Ref .
; Assertions
; Assertion:
StreamConnection = <stream-connection @source #!Source @sink #!Sink @spec any>.
StreamSpecListenable = <stream-spec-listenable @spec any>.
StreamSpecConnectable = <stream-spec-connectable @spec any>.
; Assertion
StreamListener = <stream-listener @spec any @handle #!ConnectionHandler>.
; Assertions:
StreamListenerReady = <stream-listener-ready @spec any>.
StreamListenerError = <stream-listener-error @spec any @message string>.
; Assertion
StreamConnect = <stream-connect @spec any @handle #!ConnectionHandler>.
; Assertion
ConnectionHandler =
/ @connected <stream-connected @source #!Source @sink #!Sink>
/ @rejected <stream-rejected @message string>
.
; Assertion
; Assertion:
StreamError = <error @message string>.
Source =
@ -40,7 +30,9 @@ Sink =
/ <eof>
.
; Value:
CreditAmount = @count int / @unbounded =unbounded .
; Value:
Mode = =bytes / @lines LineMode / <packet @size int> / <object @description any>.
LineMode = =lf / =crlf .

View File

@ -5,5 +5,3 @@ TcpRemote = <tcp-remote @host string @port int>.
TcpLocal = <tcp-local @host string @port int>.
TcpPeerInfo = <tcp-peer @handle #!any @local TcpLocal @remote TcpRemote>.
TcpListenError = <tcp-listen-error @spec TcpLocal @message string>.