Sub Service_Create
'start listening for wifi connections
[B]NetSvr.Initialize(NetPort, "NetSvr")[/B]
Try
NetSvr.Listen
Catch
Log("NetSvr.Listen: " & LastException.Message)
End Try
[B]pe.Initialize("pe")
pe_ConnectivityChanged("", "", Null)[/B]
UDPSoc.Initialize("UDPSvr", UDPPort, 128)
BCAddr = Utl.GetBroadcastAddress
' Log("BCAddr: " & BCAddr)
mConnections.Initialize
bConnecting = False
MyIP = "N/A"
End Sub
Sub pe_ConnectivityChanged(NetworkType As String, State As String, Intent As Intent)
' Log("ConnectivityChanged: " & NetworkType & ", " & "State" & ", " & Intent.ExtrasToString)
' MyIP = NetSvr.GetMyWifiIP
[B]MyIP = NetSvr.GetMyIP[/B]
UpdateUI
End Sub