/* Curl_write_plain() is an internal write function that sends data to the server using plain sockets only. Otherwise meant to have the exact same proto as Curl_write()  */
CURLcode Curl_write_plain(struct connectdata *conn, curl_socket_t sockfd, const void *mem, size_t len, ssize_t *written)
/* Curl_write_plain() is an internal write function that sends data to the server using plain sockets only. Otherwise meant to have the exact same proto as Curl_write()  */
CURLcode Curl_write_plain(struct connectdata *conn, curl_socket_t sockfd, const void *mem, size_t len, ssize_t *written)
{
  ssize_t bytes_written;
  CURLcode result;
  int num = (sockfd == conn->sock[SECONDARYSOCKET]);
  bytes_written = Curl_send_plain(conn, num, mem, len, &result);
  *written = bytes_written;
  return result;
}