Xojo.Net.TCPSocket vs TCPSocket

In release 2020r2 Xojo.Net.TCPSocket was deprecated. It contained the Method WriteData which enables you to send MemoryBlocks. I used this to exchange Pictures between OSx and iOS.

TCPSocket has only de Method Write for sending Strings.

Thanks for a solution Herman

String is the interchangeable with memory block. You can just put your memoryblock into the write method without issues.

To illustrate Derk’s point, this code works:

var s as string = "Hello"
var mb as MemoryBlock = s
var s1 as string = mb // "Hello", but with nil encoding
1 Like

Thanks Derk and Kim, I managed to make it work.
Sorry for the late response.

1 Like

Aujourd’hui hui " TCPSocket.write" ne fonctionne pas.
Today “TCPSocket.write” does not work.