Loading bob-test.fs +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ init-client ." Bob revoked: " pkc $20 85type cr replace-me ." Bob replaced: " pkc $20 85type cr do-disconnect ; disconnect-me ; strict-keys off c:bob server-loop Loading client-tests.fs +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ Variable connect-nick "test" connect-nick $! : c:dht ( n -- ) $8 $8 connect-nick $@ ins-ip c:connect 0 ?DO c:add-tag "anonymous" c:fetch-tag \ c:fetch-tags LOOP do-disconnect ; LOOP disconnect-me ; : std-block ( -- ) $10 blocksize! $A blockalign! ; Loading n2o.fs +4 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,8 @@ Variable chat-key : wait-chat ( addr u -- ) ." press key to connect to " 2dup type nick>pk keysize umin chat-key $! [: chat-key $@ pubkey $@ str= IF bl unkey THEN ;] is do-connect key drop ['] noop IS do-connect ; key drop ['] noop IS do-connect [: 0 to connection #cr unkey ;] is do-disconnect ; \ commands for the command line user interface Loading Loading @@ -232,7 +233,8 @@ get-current net2o-cmds definitions 2dup wait-chat 2dup search-connect ?dup-IF >o 2drop rdrop ELSE $A $A nick-connect THEN ret+beacon do-chat ret-beacon c:disconnect THEN ; ret+beacon do-chat connection IF ret-beacon c:disconnect THEN THEN ; \ script mode Loading net2o-connected.fs +3 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ reply-table $@ inherit-table context-table \g ### connection commands ### \g $20 net2o: disconnect ( -- ) \g close connection o 0= ?EXIT n2o:dispose-context un-cmd ; o 0= ?EXIT wait-task @ IF <event o elit, ->disconnect wait-task @ event> ELSE n2o:dispose-context THEN un-cmd ; +net2o: set-ip ( $:string -- ) \g set address information $> setip-xt perform ; +net2o: get-ip ( -- ) \g request address information Loading net2o-dht.fs +2 −2 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ previous net2o-code expect-reply replace-me, cookie+request end-code| -setip n2o:send-revoke ; : do-disconnect ( -- ) : disconnect-me ( -- ) net2o-code log .time s" Disconnect" $, type cr endwith close-all disconnect end-code msg( ." disconnected" F cr ) n2o:dispose-context msg( ." Disposed context" F cr ) ; Loading @@ -368,7 +368,7 @@ previous [: over >r insert-address r> free throw n2o:new-context $6 $6 n2o:connect msg( ." beacon: connected" F cr ) replace-me msg( ." beacon: replaced" F cr ) do-disconnect ;] 3 net2o-task drop ; disconnect-me ;] 3 net2o-task drop ; \ beacon handling Loading Loading
bob-test.fs +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ init-client ." Bob revoked: " pkc $20 85type cr replace-me ." Bob replaced: " pkc $20 85type cr do-disconnect ; disconnect-me ; strict-keys off c:bob server-loop Loading
client-tests.fs +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ Variable connect-nick "test" connect-nick $! : c:dht ( n -- ) $8 $8 connect-nick $@ ins-ip c:connect 0 ?DO c:add-tag "anonymous" c:fetch-tag \ c:fetch-tags LOOP do-disconnect ; LOOP disconnect-me ; : std-block ( -- ) $10 blocksize! $A blockalign! ; Loading
n2o.fs +4 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,8 @@ Variable chat-key : wait-chat ( addr u -- ) ." press key to connect to " 2dup type nick>pk keysize umin chat-key $! [: chat-key $@ pubkey $@ str= IF bl unkey THEN ;] is do-connect key drop ['] noop IS do-connect ; key drop ['] noop IS do-connect [: 0 to connection #cr unkey ;] is do-disconnect ; \ commands for the command line user interface Loading Loading @@ -232,7 +233,8 @@ get-current net2o-cmds definitions 2dup wait-chat 2dup search-connect ?dup-IF >o 2drop rdrop ELSE $A $A nick-connect THEN ret+beacon do-chat ret-beacon c:disconnect THEN ; ret+beacon do-chat connection IF ret-beacon c:disconnect THEN THEN ; \ script mode Loading
net2o-connected.fs +3 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ reply-table $@ inherit-table context-table \g ### connection commands ### \g $20 net2o: disconnect ( -- ) \g close connection o 0= ?EXIT n2o:dispose-context un-cmd ; o 0= ?EXIT wait-task @ IF <event o elit, ->disconnect wait-task @ event> ELSE n2o:dispose-context THEN un-cmd ; +net2o: set-ip ( $:string -- ) \g set address information $> setip-xt perform ; +net2o: get-ip ( -- ) \g request address information Loading
net2o-dht.fs +2 −2 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ previous net2o-code expect-reply replace-me, cookie+request end-code| -setip n2o:send-revoke ; : do-disconnect ( -- ) : disconnect-me ( -- ) net2o-code log .time s" Disconnect" $, type cr endwith close-all disconnect end-code msg( ." disconnected" F cr ) n2o:dispose-context msg( ." Disposed context" F cr ) ; Loading @@ -368,7 +368,7 @@ previous [: over >r insert-address r> free throw n2o:new-context $6 $6 n2o:connect msg( ." beacon: connected" F cr ) replace-me msg( ." beacon: replaced" F cr ) do-disconnect ;] 3 net2o-task drop ; disconnect-me ;] 3 net2o-task drop ; \ beacon handling Loading