Commit 8cc90eff authored by Bernd Paysan's avatar Bernd Paysan

add port declaration to config

parent 0d061c3d
......@@ -568,7 +568,7 @@ in net2o : ok? ( -- ) o?
tag( ." tag: " tag-addr dup hex. 2@ swap hex. hex. forth:cr )
code-vdest r@ reply-dest 64!
r> code-reply dup off to reply-tag ;
in net2o : ok ( tag -- ) 'o' forth:emit \ ." ok" forth:cr
in net2o : ok ( tag -- ) \ ." ok" forth:cr
\ timeout( ." ok: " dup hex. forth:cr )
o 0= IF drop EXIT THEN
request( ." request acked: " dup . cr )
......
......@@ -111,7 +111,7 @@ Forward insert-addr ( o -- )
THEN
cell +LOOP o>
cell +LOOP
;] #map ;
;] #map #0. n2o:nat ;
\ notification for address changes
......@@ -143,7 +143,7 @@ event: :>renat ( -- ) renat-all ;
beacon( ." done renat" cr ) ;
scope{ /chat
: renat ( addr u -- ) 2drop renat-all ;
: renat ( addr u -- ) renat-all nat ;
}scope
\ beacon handling
......
......@@ -313,8 +313,7 @@ Forward !my-addr ( -- )
\ Create udp socket
4242 Value net2o-port
0 Value net2o-client-port \ client port by default unassigned
4242 Value net2o-port \ fix server port
Variable net2o-host "net2o.de" net2o-host $!
......
......@@ -446,7 +446,7 @@ warnings !
\G -port: sets port to a fixed number for reachability from outside,
\G -port: allows to define port forwarding rules in the firewall
\G -port: only for client; server-side port is different
?nextarg 0= ?EXIT s>number drop to net2o-client-port
?nextarg 0= ?EXIT s>number drop config:port# !
next-cmd ;
: -otr ( --- )
......
......@@ -1422,7 +1422,7 @@ Variable timeout-tasks
: +next-timeouts ( -- timeout )
rtdelay 64@ timeouts @ >timeout ticks 64+ ;
: +timeouts ( -- timeout )
+next-timeouts 1 timeouts +! '+' forth:emit ( @ ." TO inc: " . cr ) ;
+next-timeouts 1 timeouts +! ( @ ." TO inc: " . cr ) ;
: +timeout0 ( -- timeout )
rtdelay 64@ ticker 64@ 64+ ;
: 0timeout ( -- )
......@@ -1827,9 +1827,9 @@ Defer init-rest
Variable initialized
: init-client ( -- ) true initialized !@ 0= IF
init-dirs net2o-client-port init-rest THEN ;
init-dirs config:port# @ init-rest THEN ;
: init-server ( -- ) true initialized !@ 0= IF
init-dirs net2o-port init-rest THEN ;
init-dirs config:port# @ net2o-port over select init-rest THEN ;
\ connection cookies
......
......@@ -349,6 +349,7 @@ Variable logsize#
Variable rootdirs$
Variable prio#
Variable host$ \g set host to this name
Variable port# \g if not zero, use this port
Variable orighost$ \g if the host is orighost$
Variable date#
$Variable objects$
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment