PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → Sending binary through socket connection
Sending binary through socket connection
Débuté par Rodrigo Felipe Wiebbelling, 31 mai 2016 21:23 - 3 réponses
Posté le 31 mai 2016 - 21:23
Hi, I want to send binary messages through socket connection, the idea is send 4 bytes of a integer representing the message size, after that, send the message itself in binary. Anyone knows if that is possible, if yes, how I do that?
Posté le 31 mai 2016 - 22:38
Hi Rodrigo,

the help of socketwrite indicates that you can send a string or a
BUFFER, ie binary information

Best regards


--
Fabrice Harari
Consultant WinDev, WebDev et WinDev Mobile International

Plus d'information sur http://fabriceharari.com
Posté le 02 juin 2016 - 16:46
Load the binary in a Buffer variable, if it is a file use fLoadBuffer(<External file>) to load data, then use SocketWrite() to send it.
In the other side use SocketRead() and fSaveBuffer().
Posté le 02 juin 2016 - 17:07
Load the binary into a Buffer variable, if it is a file use fLoadBuffer() to load it, then unse SocketWrite() to send it. In the other side use SocketRead() to retrieve data into a buffer and fSaveBuffer() to create and fill an external file with it.