Revision 5e490c7d output-chunkstream.c

View differences:

output-chunkstream.c
117 117
    pos += sizeof(size) + size;
118 118
  }
119 119

  
120
  ret = write(fd, sendbuf, pos);
120
  if (mode == TCP_MODE) {  //distiction needed by Win32
121
    ret = send(fd, sendbuf, pos, 0);
122
  } else {
123
    ret = write(fd, sendbuf, pos);
124
  }
121 125
  if (ret < 0) {
122 126
#ifndef _WIN32
123 127
    if (ret == -1 &&  (errno == EAGAIN || errno == EWOULDBLOCK)) {

Also available in: Unified diff