Platforms to show: All Mac Windows Linux Cross-Platform

PacketSocketMBS class

Super class: TCPSocket

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Network MBS Network Plugin 8.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: An extension to the socket class for easy sending packets through the net.
A packet is made like this:
+0: Size of data block
+4: 4 byte code string
+8: 4 byte for ID
+12: variable data.

The numbers are send in low endian format so this is crossplatform.

This socket subclass can be easily made in Xojo code itself. I did it for several of my applications, so if you like it decide between making it yourself or using this one which may even be faster, because it is written in C?

This class is only available in RB 4.0 or newer, because it crashes on RB 3.5.

As the strings are transferred as binary data you need to take care that you send text e.g. as UTF8 and restore this encoding setting on receiving.
Subclass of the TCPSocket class.
  • event ReceivedPacket(data as string,code as string,ID as Integer)
  • 3 methods

Super class TCPSocket

This class has no sub classes.

Some examples using this class:

Blog Entries

The items on this page are in the following plugins: MBS Network Plugin.

OverlayMBS   -   PaletteCalculatorMBS

Feedback: Report problem or ask question.

The biggest plugin in space...

Start Chat