Platforms to show: All Mac Windows Linux Cross-Platform

/Network/Socket Options
Required plugins for this example: MBS Network Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Network/Socket Options
This example is the version from Fri, 3rd Jan 2013.
Project "Socket Options.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
EventHandler Sub Open() s = new TCPSocket s.Port = 0 s.listen list.AddRow "TCP Socket" list.AddRow "OptionMaximumSegmentSizeMBS", str(s.OptionMaximumSegmentSizeMBS) list.AddRow "OptionReceiveBufferSizeMBS", str(s.OptionReceiveBufferSizeMBS) list.AddRow "OptionSendBufferSizeMBS", str(s.OptionSendBufferSizeMBS) dim n as integer = s.OptionTypeMBS list.AddRow "OptionTypeMBS", str(n)+" "+TypeName(n) list.AddRow "OptionTOSMBS", str(s.OptionTOSMBS) list.AddRow "OptionTTLMBS", str(s.OptionTTLMBS) list.AddRow "OptionMutliCastTTLMBS", str(s.OptionMutliCastTTLMBS) u = new UDPSocket u.port = 9000 call u.connect list.AddRow "UDP Socket" list.AddRow "OptionMaximumSegmentSizeMBS", str(u.OptionMaximumSegmentSizeMBS) list.AddRow "OptionReceiveBufferSizeMBS", str(u.OptionReceiveBufferSizeMBS) list.AddRow "OptionSendBufferSizeMBS", str(u.OptionSendBufferSizeMBS) n = u.OptionTypeMBS list.AddRow "OptionTypeMBS", str(n)+" "+TypeName(n) list.AddRow "OptionTOSMBS", str(u.OptionTOSMBS) list.AddRow "OptionTTLMBS", str(u.OptionTTLMBS) list.AddRow "OptionMutliCastTTLMBS", str(u.OptionMutliCastTTLMBS) End EventHandler
Function TypeName(n as integer) As string Select case n case 1 Return "stream" case 2 Return "datagram" case 3 Return "raw socket" case 4 Return "reliably-delivered message socket" case 5 Return "sequenced packet stream" else Return "?" end Select End Function
Property s As TCPSocket
Property u As UDPSocket
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

Feedback, Comments & Corrections

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

The biggest plugin in space...

MBS FileMaker blog