Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changes between Version 5 and Version 6 of SocketFileCopyExample

Show
Ignore:
Author:
erpe (IP: 89.247.60.236)
Timestamp:
02/17/10 00:18:35 (5 years ago)
Comment:

adopt for 0.99.9

Legend:

Unmodified
Added
Removed
Modified
  • SocketFileCopyExample

    v5 v6  
    1313 
    1414private import  tango.io.Console, 
    15                 tango.io.FileConduit
     15                tango.io.device.File
    1616 
    17 private import  tango.net.ServerSocket, 
    18                 tango.net.SocketConduit; 
     17private import  tango.net.InternetAddress; 
     18 
     19private import  tango.net.device.Socket; 
     20 
    1921 
    2022/******************************************************************************* 
    3638 
    3739                // copy incoming stream to a local file 
    38                 auto file = new FileConduit ("dumpster.log", FileConduit.WriteCreate); 
     40                auto file = new File ("dumpster.log", File.WriteCreate); 
    3941                file.copy(stream).flush.close; 
    4042        } 
    5052 
    5153           // make a connection request to the server 
    52            auto send = new SocketConduit
     54           auto send = new Socket
    5355           send.connect (new InternetAddress("localhost", 8080)); 
    5456 
    5557           // send the specified file 
    56            send.copy (new FileConduit (args[1])).flush.close; 
     58           send.copy (new File (args[1])).flush.close; 
    5759           }  
    5860        else