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

Ticket #279: SocketConduit.diff

File SocketConduit.diff, 0.9 kB (added by rrichardson, 1 year ago)
  • SocketConduit.d

    old new  
    270270 
    271271                // invoke the actual read op 
    272272                int count = socketReader (dst); 
    273                 if (count <= 0) 
     273                if (count == 0) 
     274                    count = BadFd; 
     275                else if (count == -1) 
    274276                    count = Eof; 
     277 
    275278                return count; 
    276279                } 
    277280        } 
     
    288291        override uint write (void[] src) 
    289292        { 
    290293                int count = socket_.send (src); 
    291                 if (count <= 0) 
    292                     count = Eof; 
     294                if (count == 0) 
     295                    count = BadFd; 
     296                                else if (count == -1) 
     297                                        count = Eof; 
    293298                return count; 
    294299        } 
    295300