<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[file versenden]]></title><description><![CDATA[<p>wie kann ich ein file über winsocks verschicken (500kb groß)???<br />
oder muss ich nur einen pointer vom file auf den buffer machen damit es das file verschickt????</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/151890/file-versenden</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 12:55:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/151890.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 30 Jun 2006 12:41:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to file versenden on Fri, 30 Jun 2006 12:41:16 GMT]]></title><description><![CDATA[<p>wie kann ich ein file über winsocks verschicken (500kb groß)???<br />
oder muss ich nur einen pointer vom file auf den buffer machen damit es das file verschickt????</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089085</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089085</guid><dc:creator><![CDATA[lola1234]]></dc:creator><pubDate>Fri, 30 Jun 2006 12:41:16 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Fri, 30 Jun 2006 13:17:51 GMT]]></title><description><![CDATA[<p>mit <a href="https://www.google.de/search?&amp;q=site%3Amsdn.microsoft.com%20send" rel="nofollow">Google: site:msdn.microsoft.com send</a></p>
<p>MfG,<br />
*Ranner*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089109</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089109</guid><dc:creator><![CDATA[*Ranner*]]></dc:creator><pubDate>Fri, 30 Jun 2006 13:17:51 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Fri, 30 Jun 2006 13:18:48 GMT]]></title><description><![CDATA[<p>Boah dieser MSDN Knopf, sorry der Link ist Mist. Probieren wir es mal mit der guten alten Manpage</p>
<p>mit <a href="http://man.cx/send" rel="nofollow">man: send</a></p>
<p>MfG,<br />
*Ranner*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089110</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089110</guid><dc:creator><![CDATA[*Ranner*]]></dc:creator><pubDate>Fri, 30 Jun 2006 13:18:48 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Fri, 30 Jun 2006 13:21:55 GMT]]></title><description><![CDATA[<p>Tach,</p>
<p>Les dir mal das durch:<br />
<a href="http://beej.us/guide/bgnet/output/html/index.html" rel="nofollow">http://beej.us/guide/bgnet/output/html/index.html</a></p>
<p>Gruß TheImaginator</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089111</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089111</guid><dc:creator><![CDATA[TheImaginator]]></dc:creator><pubDate>Fri, 30 Jun 2006 13:21:55 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Fri, 30 Jun 2006 13:26:58 GMT]]></title><description><![CDATA[<p>Lies das File häppchenweise in den Speicher, versende die Häppchen und setze es drüben wieder zusammen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089114</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089114</guid><dc:creator><![CDATA[WebFritzi]]></dc:creator><pubDate>Fri, 30 Jun 2006 13:26:58 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Fri, 30 Jun 2006 13:49:44 GMT]]></title><description><![CDATA[<p>Mir ist gerade noch eingefallen du benutzt wohl besser WinInet. Damit gehts viel einfacher <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p><a href="https://www.google.de/search?&amp;q=site%3Amsdn.microsoft.com%20WinInet" rel="nofollow">Google: site:msdn.microsoft.com WinInet</a></p>
<p>MfG,<br />
*Ranner*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089133</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089133</guid><dc:creator><![CDATA[*Ranner*]]></dc:creator><pubDate>Fri, 30 Jun 2006 13:49:44 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Fri, 30 Jun 2006 13:53:29 GMT]]></title><description><![CDATA[<p><a href="https://www.google.de/search?&amp;q=site%3Amsdn.microsoft.com%20TransmitFile" rel="nofollow">Google: site:msdn.microsoft.com TransmitFile</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089137</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089137</guid><dc:creator><![CDATA[button ausprobierer]]></dc:creator><pubDate>Fri, 30 Jun 2006 13:53:29 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Sat, 01 Jul 2006 12:07:20 GMT]]></title><description><![CDATA[<p>ich leses jetzt in einzelnen stücken aus</p>
<pre><code class="language-cpp">while(gelesen=fread(upload,1,500,tranffile) &gt; 0)
    {
       printf(&quot;ANFANG DURCHGANG\n&quot;);
       send(sock, upload, strlen(upload), 0);
       printf(&quot;\n\n%s &lt;- %d\n\n&quot;,upload,strlen(upload)); 
       strcpy(upload,&quot;&quot;);
       printf(&quot;%s&lt;- upload\n&quot;,upload);
    }
</code></pre>
<p>aber leider hört fread nicht mehr richtig auf ,es speichert noch einen teil vom anfang des files in den schluss <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089495</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089495</guid><dc:creator><![CDATA[lola1234]]></dc:creator><pubDate>Sat, 01 Jul 2006 12:07:20 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Sat, 01 Jul 2006 12:43:34 GMT]]></title><description><![CDATA[<p>:schland: :schland: :schland: Warum benutzt du strlen? da musst du &quot;gelesen&quot; einsetzen. :schland: :schland: :schland:</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089530</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089530</guid><dc:creator><![CDATA[kola]]></dc:creator><pubDate>Sat, 01 Jul 2006 12:43:34 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Sat, 01 Jul 2006 13:08:33 GMT]]></title><description><![CDATA[<p>Benutze:</p>
<p>button ausprobierer schrieb:</p>
<blockquote>
<p><a href="https://www.google.de/search?&amp;q=site%3Amsdn.microsoft.com%20TransmitFile" rel="nofollow">Google: site:msdn.microsoft.com TransmitFile</a></p>
</blockquote>
<p>MfG,<br />
:schland: *Ranner* :schland:</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089543</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089543</guid><dc:creator><![CDATA[*Ranner*]]></dc:creator><pubDate>Sat, 01 Jul 2006 13:08:33 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Sat, 01 Jul 2006 13:10:19 GMT]]></title><description><![CDATA[<p>:schland: Benutze lieber nicht TransmitFile das funktioniert nicht auf Windows 98 und Linux. :schland:</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089545</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089545</guid><dc:creator><![CDATA[nöö]]></dc:creator><pubDate>Sat, 01 Jul 2006 13:10:19 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Sat, 01 Jul 2006 15:05:26 GMT]]></title><description><![CDATA[<p>So wie ich das verstanden hab suchst du n Algo, mit dem du ne Datei verschicken kannst.</p>
<p>Also:</p>
<pre><code>#include &lt;winsock2.h&gt;
#include &lt;fstream&gt;

using namespace std;

#define BUFSIZE 1024 // variabel

... // Das ganze Socket-Zeugs

int iRueckgabe; // Rückgabewert von send(...)
int iBytes; // Anzahl gesendeter Bytes
char buf[BUFSIZE];
char *sendBuf;

ifstream dl(&quot;file&quot;, ios::binary);

while(!dl.eof())
{
   memset(buf, '\0', BUFSIZE); // Buffer leeren
   dl.read(buf, BUFSIZE); // Aus Datei lesen

   iBytes = 0;
   sendBuf = buf;

   do
   {
      // Wird benötigt, falls buf nicht vollständig gesendet wurde.
      sendBuf = buf;
      sendBuf += iBytes; // gesendete Bytes nicht noch einmal senden !

      iRueckgabe = send(socket, sendBuf, (BUFSIZE-iBytes), 0);
      if(iRueckgabe == SOCKET_ERROR)
         return -1;
      else if(iRueckgabe != (BUFSIZE-iBytes))
         iBytes += iRueckgabe;

   } while(iRueckgabe != (BUFSIZE-iBytes));
}

dl.close();
</code></pre>
<p>Ich weiß, is nicht die schönste Lösugen, aber funktioniert.<br />
Ich benutz diesen Algo in all meinen Servern.<br />
Falls es Fragen gibt, sag einfach Bescheid.</p>
<p>Gruß TheImaginator</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089605</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089605</guid><dc:creator><![CDATA[TheImaginator]]></dc:creator><pubDate>Sat, 01 Jul 2006 15:05:26 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Sat, 01 Jul 2006 22:00:10 GMT]]></title><description><![CDATA[<p>nöö schrieb:</p>
<blockquote>
<p>:schland: Benutze lieber nicht TransmitFile das funktioniert nicht auf Windows 98 und Linux. :schland:</p>
</blockquote>
<p>Welche Pfeife benutzt heutzutage bitte Windows 98? Ist kein Argument. Und wen interessiert Linux? Richtig, niemanden.</p>
<p>MfG,<br />
:schland: *Ranner* :schland:</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089857</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089857</guid><dc:creator><![CDATA[*Ranner*]]></dc:creator><pubDate>Sat, 01 Jul 2006 22:00:10 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Sun, 02 Jul 2006 17:47:06 GMT]]></title><description><![CDATA[<p><em>Ranner</em> schrieb:</p>
<blockquote>
<p>nöö schrieb:</p>
<blockquote>
<p>:schland: Benutze lieber nicht TransmitFile das funktioniert nicht auf Windows 98 und Linux. :schland:</p>
</blockquote>
<p>Welche Pfeife benutzt heutzutage bitte Windows 98? Ist kein Argument. Und wen interessiert Linux? Richtig, niemanden.</p>
<p>MfG,<br />
:schland: *Ranner* :schland:</p>
</blockquote>
<p>Sorry, aber Leute die heutzutage noch Linux ignorieren, sind meiner Meinung nach &quot;Pfeifen&quot;.<br />
Linux hat Windoof einiges voraus!<br />
Da wir hier aber in nem WinAPI-Forum sind, empfehle ich dir auch TransmitFile, da du glaub ich kaum Win-98-User mit deinem Programm ansprechen willst, oder?</p>
<p>Gruß TheImaginator</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1090285</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1090285</guid><dc:creator><![CDATA[TheImaginator]]></dc:creator><pubDate>Sun, 02 Jul 2006 17:47:06 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Sun, 02 Jul 2006 18:31:43 GMT]]></title><description><![CDATA[<p>So meinte ich es ja auch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>MfG,<br />
:schland: *Ranner* :schland:</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1090317</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1090317</guid><dc:creator><![CDATA[*Ranner*]]></dc:creator><pubDate>Sun, 02 Jul 2006 18:31:43 GMT</pubDate></item><item><title><![CDATA[Reply to file versenden on Sun, 02 Jul 2006 18:36:27 GMT]]></title><description><![CDATA[<p>TransmitFile ist auf Client Betriebssystemen eingeschränkt. Es können nur 2 TransmitFile Aufrufe gleichzeitig ausgeführt werden. Also nix für Server die man unter normalem Windows XP ausführen will.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1090320</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1090320</guid><dc:creator><![CDATA[hinweis]]></dc:creator><pubDate>Sun, 02 Jul 2006 18:36:27 GMT</pubDate></item></channel></rss>