Example: /Network/Socket Options

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

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

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


💬 Ask a question or report a problem