<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font face="Arial">Dík. Takže asi nejlepší zápis je</font></p>
<div style="color: #4e5b61;background-color: #ffffff;font-family: Consolas, 'Courier New', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #4e5b61;"> </span><span style="color: #00979d;">const</span><span style="color: #4e5b61;"> </span><span style="color: #00979d;">char</span><span style="color: #4e5b61;"> p[]=</span><span style="color: #005c5f;">"\x04\xFF\x70\x00\xE0"</span><span style="color: #4e5b61;">;</span></div><div><span style="color: #4e5b61;"> </span><span style="color: #d35400;">client</span><span style="color: #4e5b61;">.</span><span style="color: #d35400;">write</span><span style="color: #434f54;">(</span><span style="color: #4e5b61;">p,</span><span style="color: #005c5f;">5</span><span style="color: #434f54;">)</span><span style="color: #4e5b61;">;</span></div><div><span style="color: #4e5b61;">
</span></div></div>
<p></p>
<pre class="moz-signature" cols="72">Martin Záruba</pre>
<div class="moz-cite-prefix">Dne 27.8.2023 v 15:17 Jindroush
napsal(a):<br>
</div>
<blockquote type="cite"
cite="mid:46fc8cff-65c6-a0ce-8bda-42af155b0aeb@seznam.cz">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="moz-cite-prefix">C retezec se ukoncuje nulou, takze ji
nemuze obsahovat.<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">To client write by melo fungovat,
jestli to je toto <a class="moz-txt-link-freetext"
href="https://www.arduino.cc/reference/en/libraries/ethernet/client.write/"
moz-do-not-send="true">https://www.arduino.cc/reference/en/libraries/ethernet/client.write/</a><br>
<pre style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2"><code class="language-fallback" data-lang="fallback">client.write(buf, len)</code></pre>
</div>
<div class="moz-cite-prefix">Vyrobte si staticke pole bajtu a pak
to zavolejte takto.</div>
<div class="moz-cite-prefix">J.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 27.08.2023 15:07, Martin Záruba
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:cb3a33ba-b0e7-25e0-ead6-fd61048bc2b6@volny.cz">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<p><font face="Arial">Aha. Takže string v cečku nesmí obsahovat
0? Nebo je to jen problém toho client.print? Pak by to šlo
obelstít</font></p>
<div style="color: #4e5b61;background-color: #ffffff;font-family: Consolas, 'Courier New', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><div style="color: #4e5b61;background-color: #ffffff;font-family: Consolas, 'Courier New', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #00979d;">char</span><span style="color: #4e5b61;"> prefix[]=</span><span style="color: #005c5f;">"\x04\xFF\x70\x00\xE0"</span><span style="color: #4e5b61;">;</span></div></div><span style="color: #728e00;">for</span><span style="color: #4e5b61;"> </span><span style="color: #434f54;">(</span><span style="color: #00979d;">int</span><span style="color: #4e5b61;"> i=</span><span style="color: #005c5f;">0</span><span style="color: #4e5b61;">;i<</span><span style="color: #005c5f;">5</span><span style="color: #4e5b61;">;i++</span><span style="color: #434f54;">)</span><span style="color: #4e5b61;"> </span><span style="color: #d35400;">client</span><span style="color: #4e5b61;">.</span><span style="color: #d35400;">write</span><span style="color: #434f54;">(</span><span style="color: #d35400;">prefix</span><span style="color: #4e5b61;">[i]</span><span style="color: #434f54;">)</span><span style="color: #4e5b61;">;</span></div><div><span style="color: #4e5b61;">
</span></div><div><span style="color: #4e5b61;">Ale to mi připadá jako drbat se levou rukou za pravým uchem. Nejde to líp?
</span></div></div>
<pre class="moz-signature" cols="72">Martin Záruba</pre>
<div class="moz-cite-prefix">Dne 27.8.2023 v 14:50 Jindroush
napsal(a):<br>
</div>
<blockquote type="cite"
cite="mid:788fd3a2-799c-b578-4eae-4f72e225e098@seznam.cz">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<div class="moz-cite-prefix">On 27.08.2023 14:35, Martin
Záruba wrote:<br>
</div>
<blockquote type="cite"
cite="mid:60662002-f8a6-5d34-d7b3-d58962761281@volny.cz">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<p>Jsem zvyklý na DELPHI, tak s C++ stále bojuji. <br>
</p>
<p>Potřebuji příkazem client.print(<span style="color:
#005c5f;">"\x04\xFF\x70\x00\xE0"</span>); odeslat data
na server. Jenže poslední dva znaky <span style="color:
#005c5f;">\x00\xE0 </span>na server nedojdou. Díval
jsem se WireShakem a opravdu nejsou odeslané. Co dělám
blbě nebo jak to udělat jinak? V DELPHI to chodí normálně.<span
style="color: #005c5f;"></span></p>
</blockquote>
Ceckovy string je zero terminated. Pascalsky string zacina
delkou. Proto toto lze udelat v Delphi a nelze udelat v C
pomoci ceckoveho stringu. Je treba si na to napsat vlastni
funkci, nebo pouzit nejakou ne-stringovou funkci (nema ten
client nejaky write?)<br>
<pre class="moz-signature" cols="72">--
Jindroush <a class="moz-txt-link-rfc2396E" href="mailto:jindroush@seznam.cz" moz-do-not-send="true"><jindroush@seznam.cz></a></pre>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
HW-list mailing list - sponsored by <a class="moz-txt-link-abbreviated" href="http://www.HW.cz" moz-do-not-send="true">www.HW.cz</a>
<a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:Hw-list@list.hw.cz" moz-do-not-send="true">Hw-list@list.hw.cz</a>
<a class="moz-txt-link-freetext" href="http://list.hw.cz/mailman/listinfo/hw-list" moz-do-not-send="true">http://list.hw.cz/mailman/listinfo/hw-list</a>
</pre>
</blockquote>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
HW-list mailing list - sponsored by <a class="moz-txt-link-abbreviated" href="http://www.HW.cz" moz-do-not-send="true">www.HW.cz</a>
<a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:Hw-list@list.hw.cz" moz-do-not-send="true">Hw-list@list.hw.cz</a>
<a class="moz-txt-link-freetext" href="http://list.hw.cz/mailman/listinfo/hw-list" moz-do-not-send="true">http://list.hw.cz/mailman/listinfo/hw-list</a>
</pre>
</blockquote>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Jindroush <a class="moz-txt-link-rfc2396E" href="mailto:jindroush@seznam.cz" moz-do-not-send="true"><jindroush@seznam.cz></a></pre>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
HW-list mailing list - sponsored by <a class="moz-txt-link-abbreviated" href="http://www.HW.cz">www.HW.cz</a>
<a class="moz-txt-link-abbreviated" href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz</a>
<a class="moz-txt-link-freetext" href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</a>
</pre>
</blockquote>
</body>
</html>