noisy echo works, starting rubicon querier

This commit is contained in:
Peter Harpending
2026-09-02 20:38:08 -07:00
parent ede7d8e977
commit 66364fce04
3 changed files with 6 additions and 5 deletions
+3 -3
View File
@@ -20,9 +20,9 @@ main([]) -> main_ii(6969);
main([PortNum]) -> main_ii(list_to_integer(PortNum)).
main_ii(PortNum) ->
TcpOpts = [binary, {packet, 0}, {active, once}],
TcpOpts = [binary, {packet, 0}, {active, true}],
{ok, TSock} = gen_tcp:connect("localhost", PortNum, TcpOpts),
ok = inet:setopts(TSock, [{active, once}]),
%ok = inet:setopts(TSock, [{active, once}]),
{ok, NSock, _HandshakeState} = enoise:connect(TSock, noise_options()),
% need keyboard process
Self = self(),
@@ -37,7 +37,7 @@ noise_options() ->
j_loop(JS = #js{rcv = Rcv, tsock = TSock, nsock = NSock}) ->
ok = inet:setopts(TSock, [{active, once}]),
%ok = inet:setopts(TSock, [{active, once}]),
receive
{noise, NSock, Bytes} ->
NewRcv = <<Rcv/binary, Bytes/binary>>,
+2 -2
View File
@@ -45,7 +45,7 @@ noise_options() ->
% pimp process startup
p_init(Port) ->
p_logln("pimp startup (p_init)"),
Opts = [binary, {packet, 0}, {active, once}],
Opts = [binary, {packet, 0}, {active, true}],
case gen_tcp:listen(Port, Opts) of
{ok, LSock} ->
ok = p_logfln("pimp starting: ~tp", [self()]),
@@ -157,7 +157,7 @@ h_init(LSock, HS = #hs{name = Name, daddy = Daddy, asock = none, nsock = none})
h_loop(HS = #hs{name = Name, daddy = Daddy, asock = ASock, nsock = NSock}) ->
ok = inet:setopts(ASock, [{active, once}]),
%ok = inet:setopts(ASock, [{active, once}]),
receive
{noise, NSock, Data} ->
Data_II = string:chomp(Data),
Executable
+1
View File
@@ -0,0 +1 @@
#!/usr/bin/env escrip