The search is done Sequentialy Client need to knows more o less the time expect time to solve.
The server only reply one single line. Client must read that line and proceed according its content, possible replies:
-`404 Not Found` if the key wasn't in the given range
-`400 Bad Request`if there is some error on client request
-`value` hexadecimal value with the Private KEY in case of be found
The server will close the Conection inmediatly after send that line, also in case some other error the server will close the Conection without send any error message. Client need to hadle the Conection status by his own.
### Example
Run the server in one terminal:
```
./bsgsd -k 4096 -t 8 -6
[+] Version 0.2.230519 Satoshi Quest, developed by AlbertoBSD
[+] K factor 4096
[+] Threads : 8
[W] Skipping checksums on files
[+] Mode BSGS secuential
[+] N = 0x100000000000
[+] Bloom filter for 17179869184 elements : 58890.60 MB
[+] Bloom filter for 536870912 elements : 1840.33 MB
[+] Bloom filter for 16777216 elements : 57.51 MB
[+] Allocating 256.00 MB for 16777216 bP Points
[+] Reading bloom filter from file keyhunt_bsgs_4_17179869184.blm .... Done!
[+] Reading bloom filter from file keyhunt_bsgs_6_536870912.blm .... Done!
[+] Reading bP Table from file keyhunt_bsgs_2_16777216.tbl .... Done!
[+] Reading bloom filter from file keyhunt_bsgs_7_16777216.blm .... Done!
[+] Listening in 127.0.0.1:8080
```
Once that you see `[+] Listening in 127.0.0.1:8080` the server is ready to process client requests
Now we can connect it in annother terminal with `netcat` as client, this server is `64 GB` ram, expected time for puzzle 63 `~8` Seconds
command:
```
time echo "0365ec2994b8cc0a20d40dd69edfe55ca32a54bcbbaa6b0ddcff36049301a54579 4000000000000000:8000000000000000" | nc -v localhost 8080
```
```
time echo "0365ec2994b8cc0a20d40dd69edfe55ca32a54bcbbaa6b0ddcff36049301a54579 4000000000000000:8000000000000000" | nc -v localhost 8080
localhost.localdomain [127.0.0.1] 8080 (http-alt) open
7cce5efdaccf6808
real 0m7.551s
user 0m0.002s
sys 0m0.001s
```
If you notice the answer from the server is `7cce5efdaccf6808`
**Other example `404 Not Found`:**
```
time echo "0233709eb11e0d4439a729f21c2c443dedb727528229713f0065721ba8fa46f00e 4000000000000000:8000000000000000" | nc -v localhost 8080
localhost.localdomain [127.0.0.1] 8080 (http-alt) open
404 Not Found
real 0m7.948s
user 0m0.003s
sys 0m0.000s
```
### One client at the time
To maximize the Speed of BSGS this server only attends one client at the time.
I know what are you thinking, but if you are doing 10 ranges of 63 bits, you can send only one range and the time and the program only will take 80 seconds (Based on the speed of the previous example).
But if i do the program multi-client, and you send the 10 ranges at the same time in 10 different connections, the whole process will also take 80 seconds... so is only question of how your client send the data and manage the ranges..