From ed542ac45e00c9b2faa0b41f3c00de6e291e5678 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 1 Jan 2021 11:30:03 -0800 Subject: fixes #1345 Restructure the source tree This is not quite complete, but it sets the stage for other protocols (such as zmq or mqtt) to be added to the project. --- src/transport/ws/README.adoc | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 src/transport/ws/README.adoc (limited to 'src/transport/ws/README.adoc') diff --git a/src/transport/ws/README.adoc b/src/transport/ws/README.adoc deleted file mode 100644 index e3101297..00000000 --- a/src/transport/ws/README.adoc +++ /dev/null @@ -1,38 +0,0 @@ -= websocket transport - -This transport provides support for SP over websocket using TCP or TLS. -When using TCP, it is compatible with the libnanomsg legacy transport. -It also is compatible with mangos (both TCP and TLS). - -TLS support requires the mbedTLS library. - -We set the "protocol" such as "pair.sp.nanomsg.org" in the -Sec-WebSocket-Protocol field -- the client sets to the the server's -protocol - i.e. the protocol that the server speaks. For example, -if the the server is a REP, then a REQ client would send "rep.sp.nanomsg.org". - -The server sends the same value (it's own), per the WebSocket specs. (Note -that the client's protocol is never sent, but assumed to be complementary -to the protocol in the Sec-WebSocket-Protocol field.) - -Each SP message is a WebSocket message. - -WebSocket is defined in RFC 6455. - -== Design - -We unfortunately need to implement our own design for this -- the only -reasonable client library would be libcurl, and there is a dearth of -suitable server libraries. Since we don't have to support full HTTP, but -just the initial handshake, this isn't too tragic. - -== Multiple Server Sockets - -In order to support Multiple Server sockets listening on the same port, -the application must be long lived. We will set up a listener on the -configured TCP (or TLS) port, and examine the PATH supplied in the GET. -This will be used to match against the URL requested, and if the URL -matches we will create the appropriate pipe. - -If no server endpoint at that address can be found, we return an -HTTP error, and close the socket. -- cgit v1.2.3-70-g09d2