Skip to content

Commit f11129a

Browse files
committed
Ren "websocket" config to "socket", update def ports help.
1 parent 9d41f77 commit f11129a

File tree

5 files changed

+24
-23
lines changed

5 files changed

+24
-23
lines changed

include/bitcoin/node/channels/channel_websocket.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ namespace libbitcoin {
2828
namespace node {
2929

3030
/// Abstract base websocket channel state for the node.
31+
/// Does not inherit node::channel_http but does inherit network::channel_http.
3132
class BCN_API channel_websocket
3233
: public network::channel_websocket,
3334
public node::channel

include/bitcoin/node/settings.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class BCN_API settings
136136
server::settings::html_server explore{ "explore" };
137137

138138
/// native websocket query interface (http/s->tcp/s, json, handshake)
139-
network::settings::websocket_server websocket{ "websocket" };
139+
network::settings::websocket_server socket{ "socket" };
140140

141141
/// bitcoind compat interface (http/s, stateless json-rpc-v2)
142142
network::settings::http_server bitcoind{ "bitcoind" };

src/full_node.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ session_explore::ptr full_node::attach_explore_session() NOEXCEPT
548548

549549
session_websocket::ptr full_node::attach_websocket_session() NOEXCEPT
550550
{
551-
return net::attach<session_websocket>(*this, config_.server.websocket);
551+
return net::attach<session_websocket>(*this, config_.server.socket);
552552
}
553553

554554
session_bitcoind::ptr full_node::attach_bitcoind_session() NOEXCEPT

src/parser.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ parser::parser(system::chain::selection context) NOEXCEPT
9494
// admin
9595
configured.server.web.binds.emplace_back(asio::address{}, 8080_u16);
9696
configured.server.explore.binds.emplace_back(asio::address{}, 8180_u16);
97-
configured.server.websocket.binds.emplace_back(asio::address{}, 8280_u16);
97+
configured.server.socket.binds.emplace_back(asio::address{}, 8280_u16);
9898
configured.server.bitcoind.binds.emplace_back(asio::address{}, 8380_u16);
9999
configured.server.electrum.binds.emplace_back(asio::address{}, 8480_u16);
100100
configured.server.stratum_v1.binds.emplace_back(asio::address{}, 8580_u16);
@@ -1149,7 +1149,7 @@ options_metadata parser::load_settings() THROWS
11491149
(
11501150
"explore.bind",
11511151
value<network::config::authorities>(&configured.server.explore.binds),
1152-
"IP address to bind, multiple allowed, defaults to '0.0.0.0:8080' (all IPv4)."
1152+
"IP address to bind, multiple allowed, defaults to '0.0.0.0:8180' (all IPv4)."
11531153
)
11541154
(
11551155
"explore.connections",
@@ -1187,35 +1187,35 @@ options_metadata parser::load_settings() THROWS
11871187
"The path of the default source page, defaults to 'index.html'."
11881188
)
11891189

1190-
/* [websocket] */
1190+
/* [socket] */
11911191
(
11921192
"websocket.secure",
1193-
value<bool>(&configured.server.websocket.secure),
1193+
value<bool>(&configured.server.socket.secure),
11941194
"The service requires TLS (not implemented), defaults to 'false'."
11951195
)
11961196
(
1197-
"websocket.bind",
1198-
value<network::config::authorities>(&configured.server.websocket.binds),
1199-
"IP address to bind, multiple allowed, defaults to '0.0.0.0:8080' (all IPv4)."
1197+
"socket.bind",
1198+
value<network::config::authorities>(&configured.server.socket.binds),
1199+
"IP address to bind, multiple allowed, defaults to '0.0.0.0:8280' (all IPv4)."
12001200
)
12011201
(
1202-
"websocket.connections",
1203-
value<uint16_t>(&configured.server.websocket.connections),
1202+
"socket.connections",
1203+
value<uint16_t>(&configured.server.socket.connections),
12041204
"The required maximum number of connections, defaults to '0'."
12051205
)
12061206
(
1207-
"websocket.timeout_seconds",
1208-
value<uint32_t>(&configured.server.websocket.timeout_seconds),
1207+
"socket.timeout_seconds",
1208+
value<uint32_t>(&configured.server.socket.timeout_seconds),
12091209
"The idle timeout (http keep-alive), defaults to '60'."
12101210
)
12111211
(
1212-
"websocket.server",
1213-
value<std::string>(&configured.server.websocket.server),
1212+
"socket.server",
1213+
value<std::string>(&configured.server.socket.server),
12141214
"The server name (http header), defaults to '" BC_HTTP_SERVER_NAME "'."
12151215
)
12161216
(
1217-
"websocket.host",
1218-
value<network::config::endpoints>(&configured.server.websocket.hosts),
1217+
"socket.host",
1218+
value<network::config::endpoints>(&configured.server.socket.hosts),
12191219
"The host name (http verification), multiple allowed, defaults to empty (disabled)."
12201220
)
12211221

@@ -1228,7 +1228,7 @@ options_metadata parser::load_settings() THROWS
12281228
(
12291229
"bitcoind.bind",
12301230
value<network::config::authorities>(&configured.server.bitcoind.binds),
1231-
"IP address to bind, multiple allowed, defaults to '0.0.0.0:8080' (all IPv4)."
1231+
"IP address to bind, multiple allowed, defaults to '0.0.0.0:8380' (all IPv4)."
12321232
)
12331233
(
12341234
"bitcoind.connections",
@@ -1260,7 +1260,7 @@ options_metadata parser::load_settings() THROWS
12601260
(
12611261
"electrum.bind",
12621262
value<network::config::authorities>(&configured.server.electrum.binds),
1263-
"IP address to bind, multiple allowed, defaults to '0.0.0.0:8080' (all IPv4)."
1263+
"IP address to bind, multiple allowed, defaults to '0.0.0.0:8480' (all IPv4)."
12641264
)
12651265
(
12661266
"electrum.connections",
@@ -1282,7 +1282,7 @@ options_metadata parser::load_settings() THROWS
12821282
(
12831283
"stratum_v1.bind",
12841284
value<network::config::authorities>(&configured.server.stratum_v1.binds),
1285-
"IP address to bind, multiple allowed, defaults to '0.0.0.0:8080' (all IPv4)."
1285+
"IP address to bind, multiple allowed, defaults to '0.0.0.0:8580' (all IPv4)."
12861286
)
12871287
(
12881288
"stratum_v1.connections",
@@ -1304,7 +1304,7 @@ options_metadata parser::load_settings() THROWS
13041304
(
13051305
"stratum_v2.bind",
13061306
value<network::config::authorities>(&configured.server.stratum_v2.binds),
1307-
"IP address to bind, multiple allowed, defaults to '0.0.0.0:8080' (all IPv4)."
1307+
"IP address to bind, multiple allowed, defaults to '0.0.0.0:8680' (all IPv4)."
13081308
)
13091309
(
13101310
"stratum_v2.connections",

test/settings.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ BOOST_AUTO_TEST_CASE(server__explore_server__defaults__expected)
159159
BOOST_AUTO_TEST_CASE(server__websocket_server__defaults__expected)
160160
{
161161
const server::settings instance{};
162-
const auto server = instance.websocket;
162+
const auto server = instance.socket;
163163

164164
// tcp_server
165-
BOOST_REQUIRE_EQUAL(server.name, "websocket");
165+
BOOST_REQUIRE_EQUAL(server.name, "socket");
166166
BOOST_REQUIRE(!server.secure);
167167
BOOST_REQUIRE(server.binds.empty());
168168
BOOST_REQUIRE_EQUAL(server.connections, 0u);

0 commit comments

Comments
 (0)