Simpler stream connection protocol.
This commit is contained in:
parent
cf93327ed6
commit
824b078eac
22
stream.prs
22
stream.prs
|
@ -1,24 +1,14 @@
|
||||||
version 1 .
|
version 1 .
|
||||||
embeddedType EntityRef.Ref .
|
embeddedType EntityRef.Ref .
|
||||||
|
|
||||||
; Assertions
|
; Assertion:
|
||||||
StreamConnection = <stream-connection @source #!Source @sink #!Sink @spec any>.
|
StreamConnection = <stream-connection @source #!Source @sink #!Sink @spec any>.
|
||||||
StreamSpecListenable = <stream-spec-listenable @spec any>.
|
|
||||||
StreamSpecConnectable = <stream-spec-connectable @spec any>.
|
|
||||||
|
|
||||||
; Assertion
|
; Assertions:
|
||||||
StreamListener = <stream-listener @spec any @handle #!ConnectionHandler>.
|
StreamListenerReady = <stream-listener-ready @spec any>.
|
||||||
|
StreamListenerError = <stream-listener-error @spec any @message string>.
|
||||||
|
|
||||||
; Assertion
|
; Assertion:
|
||||||
StreamConnect = <stream-connect @spec any @handle #!ConnectionHandler>.
|
|
||||||
|
|
||||||
; Assertion
|
|
||||||
ConnectionHandler =
|
|
||||||
/ @connected <stream-connected @source #!Source @sink #!Sink>
|
|
||||||
/ @rejected <stream-rejected @message string>
|
|
||||||
.
|
|
||||||
|
|
||||||
; Assertion
|
|
||||||
StreamError = <error @message string>.
|
StreamError = <error @message string>.
|
||||||
|
|
||||||
Source =
|
Source =
|
||||||
|
@ -40,7 +30,9 @@ Sink =
|
||||||
/ <eof>
|
/ <eof>
|
||||||
.
|
.
|
||||||
|
|
||||||
|
; Value:
|
||||||
CreditAmount = @count int / @unbounded =unbounded .
|
CreditAmount = @count int / @unbounded =unbounded .
|
||||||
|
|
||||||
|
; Value:
|
||||||
Mode = =bytes / @lines LineMode / <packet @size int> / <object @description any>.
|
Mode = =bytes / @lines LineMode / <packet @size int> / <object @description any>.
|
||||||
LineMode = =lf / =crlf .
|
LineMode = =lf / =crlf .
|
||||||
|
|
2
tcp.prs
2
tcp.prs
|
@ -5,5 +5,3 @@ TcpRemote = <tcp-remote @host string @port int>.
|
||||||
TcpLocal = <tcp-local @host string @port int>.
|
TcpLocal = <tcp-local @host string @port int>.
|
||||||
|
|
||||||
TcpPeerInfo = <tcp-peer @handle #!any @local TcpLocal @remote TcpRemote>.
|
TcpPeerInfo = <tcp-peer @handle #!any @local TcpLocal @remote TcpRemote>.
|
||||||
|
|
||||||
TcpListenError = <tcp-listen-error @spec TcpLocal @message string>.
|
|
||||||
|
|
Loading…
Reference in New Issue