Annotation of gforth/net2o.fs, revision 1.1

1.1     ! pazsan      1: \ Internet 2.0 experiments
        !             2: 
        !             3: require unix/socket.fs
        !             4: 
        !             5: \ Create udp socket
        !             6: 
        !             7: 4242 Constant net2o-udp
        !             8: 
        !             9: 0 Value net2o-sock
        !            10: 0 Value net2o-srv
        !            11: 
        !            12: : new-server ( -- )
        !            13:     net2o-udp create-udp-server s" w+" c-string fdopen to net2o-srv ;
        !            14: 
        !            15: : new-client ( hostaddr u -- )
        !            16:     net2o-udp open-udp-socket to net2o-sock ;
        !            17: 
        !            18: $81A Constant maxpacket
        !            19: 
        !            20: Create inbuf maxpacket allot
        !            21: 
        !            22: : read-a-packet ( -- addr u )
        !            23:     net2o-srv inbuf maxpacket read-socket-from ;
        !            24: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>