Browse Source

Split out experimental "stream" protocols; make tcp.rkt use them; more inertness checks

Also, a few other important changes:
 - Better printing of entity-ref structs
 - Inertness checks on assertion retraction (!) and preventer-disarm
 - Correct selection of active facet during dataflow recomputations
 - Repair silly omission in turn-assert/dataflow!
main
Tony Garnock-Jones 1 year ago
parent
commit
b6bc816daf
  1. 43
      stream.prs
  2. 24
      tcp.prs

43
stream.prs

@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
version 1 .
embeddedType EntityRef.Ref .
StreamConnection = <stream-connection @source #!Source @sink #!Sink @spec any>.
; Assertion
StreamListener = <stream-listener @spec any @handle #!ConnectionHandler>.
; 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>.
Source =
; Assertions:
/ <sink @controller #!Sink>
/ StreamError
; Messages:
/ <credit @amount CreditAmount @mode Mode>
.
Sink =
; Assertions:
/ <source @controller #!Source>
/ StreamError
; Messages:
/ <data @payload any @mode Mode>
/ <eof>
.
CreditAmount = @count int / @unbounded =unbounded .
Mode = =bytes / @lines LineMode / <packet @size int> / <object @description any>.
LineMode = =lf / =crlf .

24
tcp.prs

@ -1,25 +1,7 @@ @@ -1,25 +1,7 @@
version 1 .
embeddedType EntityRef.Ref .
Connection = <connection @handle #!ActiveSocket @spec any>.
ConnectionPeer = <connection-peer @handle #!ActiveSocket @spec any>.
TcpRemote = <tcp-remote @host string @port int>.
TcpLocal = <tcp-local @host string @port int>.
TcpRemote = <remote @host string @port int>.
TcpLocal = <local @host string @port int>.
ActiveSocket =
/ <controller @controller #!Sink>
/ <close @message string>
/ Socket
.
Socket =
/ <credit @amount CreditAmount @mode Mode>
/ <data @payload bytes @mode Mode>
/ <eof>
.
CreditAmount = @count int / @unbounded =unbounded .
Mode = =bytes / @lines LineMode / <packet @size int>.
LineMode = =lf / =crlf .
TcpPeerInfo = <tcp-peer @handle #!any @local TcpLocal @remote TcpRemote>.

Loading…
Cancel
Save