Ticket #527: socket7.patch

File socket7.patch, 0.8 KB (added by bacek, 13 years ago)

Update examples/io/http.pir to use constants.

  • examples/io/http.pir

    commit 1c7a796d340fd00f2595227a2739102894a86295
    Author: Vasily Chekalkin <bacek@bacek.com>
    Date:   Wed Apr 1 07:18:34 2009 +1100
    
        Update examples/io/http.pir to use constants.
    
    diff --git a/examples/io/http.pir b/examples/io/http.pir
    index e0035df..4ea5fd9 100644
    a b  
    1919 
    2020=cut 
    2121 
     22.include 'socket.pasm' 
     23 
    2224.sub example :main 
    2325    .local pmc sock 
    2426    .local pmc address 
     
    2931    # create the socket handle 
    3032    print "Creating socket.\n" 
    3133    sock = new 'Socket' 
    32     sock.'socket'(2, 1, 0) 
     34    sock.'socket'(.PIO_PF_INET, .PIO_SOCK_STREAM, .PIO_PROTO_TCP) 
    3335    unless sock goto ERR 
    3436 
    3537    # Pack a sockaddr_in structure with IP and port