Author: quozl Date: Wed Feb 20 03:42:42 2013 New Revision: 3561 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3561
Log: inet, tcpapp, add support for applications that accept connections.
Modified: ofw/inet/tcpapp.fth
Modified: ofw/inet/tcpapp.fth ============================================================================== --- ofw/inet/tcpapp.fth Wed Feb 20 00:10:44 2013 (r3560) +++ ofw/inet/tcpapp.fth Wed Feb 20 03:42:42 2013 (r3561) @@ -14,8 +14,9 @@ dup if " $set-host" $call-tcp else 2drop then ; : tcp-connect ( port# -- ) - " connect" $call-tcp 0= abort" Connection refused + " connect" $call-tcp 0= abort" Connection refused" ; +: tcp-accept ( port# -- ) begin dup " accept" $call-tcp until drop ; : tcp-disconnect ( -- ) " disconnect" $call-tcp ; : open-tcp-connection ( hostname$ port# -- ) open-tcp -rot set-tcp-server tcp-connect
openfirmware@openfirmware.info