Skip to content

Commit ff41df6

Browse files
majectyjoojis
authored andcommitted
Add 'net_connect' JSON RPC spec
1 parent ae09fc8 commit ff41df6

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

spec/JSON-RPC.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ In the current version, it's only supported through HTTP.
101101
* [miner_submitWork](#miner_submitwork)
102102
***
103103
* [net_shareSecret](#net_sharesecret) (not implemented yet)
104+
* [net_connect](#net_connect) (not implemented yet)
104105
* [net_isConnected](#net_isconnected) (not implemented yet)
105106
* [net_disconnect](#net_disconnect) (not implemented yet)
106107
***
@@ -610,7 +611,29 @@ Request Example
610611
```
611612
curl \
612613
-H 'Content-Type: application/json' \
613-
-d '{"jsonrpc": "2.0", "method": "net_shareSecret", "params": ['0x8ae3363ccdcc02d8d662d384deefb89d', 'codechain.example.com', '3485'], "id": 5}' \
614+
-d '{"jsonrpc": "2.0", "method": "net_shareSecret", "params": ["0x24df02abcd4e984e90253dc344e89b8431bbb319c66643bfef566dfdf46ec6bc", "192.168.0.3", 3485], "id": 5}' \
615+
localhost:8080
616+
```
617+
618+
Response Example
619+
```
620+
{"jsonrpc":"2.0","result":null,"id":5}
621+
```
622+
623+
## net_connect
624+
Connect to a given address.
625+
626+
Params:
627+
1. address: `string`
628+
1. port: `number`
629+
630+
Return Type: null
631+
632+
Request Example
633+
```
634+
curl \
635+
-H 'Content-Type: application/json' \
636+
-d '{"jsonrpc": "2.0", "method": "net_connect", "params": ["192.168.0.3", 3485], "id": 5}' \
614637
localhost:8080
615638
```
616639

0 commit comments

Comments
 (0)