'Non-UI application (console / server application)
#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: True
#End Region
Sub Process_Globals
Private udp As UDPSocket
End Sub
Sub AppStart (Args() As String)
Log("starts udp listener")
udp.Initialize("udp",6832,8192)
StartMessageLoop
End Sub
Sub udp_PacketArrived (Packet As UDPPacket)
Log($"${Packet.Port}"$)
Try
Dim s As String
s = BytesToString(Packet.Data, 0, Packet.Length, "UTF-8")
Log("Mensagem Recebida > "&s)
Log("-------------------------------------------------------------")
Catch
Log(LastException)
End Try
End Sub