Skip to content

Commit

Permalink
Add note
Browse files Browse the repository at this point in the history
  • Loading branch information
ben221199 committed Mar 21, 2024
1 parent 83647b1 commit 3d217b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bip-0040.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Additionally, it is a convention to give all Stratum methods in the <code>method

It is possible to send JSON-RPC messages over different transport protocols, like TCP and HTTP. It is also possible to protect these protocols with SSL/TLS.

''Note: Because HTTP and WebSockets support virtual hosting (<code>Host</code> header or <code>:authority</code> pseudo-header), it is possible to create a server on a single IP address that supports multiple coins by checking the domain name. The same is the case for the transport protocols with SSL/TLS when SNI is used. On plain TCP, virtual hosting is not possible. A similar experience can be reached by using multiple IP addresses. For IPv6, a network of /96 would be enough to support all coins ever listed in SLIP-44. For IPv4, you need all IPv4 addresses that exist, even the invalid ones, so a suggestion is to only use the server only for coins you really need.''

===TCP===

Stratum over a TCP connection. Every JSON-RPC message (including batch messages) is send on a single line, ending with a line-feed (<code>\n</code>), so <code>\r\n</code> is also allowed. Line-feeds inside the JSON should be encoded as usual. Both client and server can initiate a request on which the other side could respond with a result or an error.
Expand Down Expand Up @@ -90,7 +92,7 @@ Stratum over an HTTP connection with SSL/TLS. Just the same as normal HTTP, but
===WebSocket===

Stratum over a WebSocket connection. When using WebSockets the JSON-RPC messages (including batch messages) are encapsulated in a WebSocket message. It is also possible to send more JSON-RPC messages in one WebSocket message. Every JSON-RPC message should and with a line-feed (\n). Both client and server can initiate a message request on which the other side could respond with a result or an error, like Stratum over TCP.
Stratum over a WebSocket connection. When using WebSockets, the JSON-RPC messages (including batch messages) are encapsulated in a WebSocket message. It is also possible to send more JSON-RPC messages in one WebSocket message. Every JSON-RPC message should end with a line-feed (\n). Both client and server can initiate a message request on which the other side could respond with a result or an error, like Stratum over TCP.

* Default port: <code>8083</code><ref name="extended">This is extended specification information of the Stratum wire protocol to make it more complete. This information will not be found in any code or specification before this BIP.</ref>
* Letter: <code>w</code><ref name="extended"/>
Expand Down

0 comments on commit 3d217b0

Please sign in to comment.