I want to use the WLAN for communication. So I wrote 2 little programs:
Clientside:
Sub ButtonSend_Click
stream.New1(client.GetStream,false)
stream.WriteString(Chr(2) & "010101001" & Chr(3))
End Sub
Sub ButtonConnect_Click
client.New1
client.Connect(client.GetIP2("PPP_PEER"),50000) 'Use Activesync IP.
Msgbox("Client connected.")
End Sub
Serverside:
Sub App_Start
server.New1(50000) 'Listens on port 50000 (all ip's available).
server.Start ' Server Objekt for send (Server is always a Sender)
client.New1 ' Client Object for receiving
client.Value = server.Accept 'This line will block waiting for the other client to connect.
Msgbox("Server connected.")
stream.New1(client.GetStream,false) 'Creates a BinaryFile object using the GetStream method.
Do While true
If client.DataAvailable Then Msgbox(stream.ReadString)
DoTasks
Loop
End Sub
It works fine, but if I use:
client.Connect(client.GetIP2("MSHEIMNETZ"),50000) ' use WLAN
with 'MSHEIMNETZ' name of the WLAN-network instead of the Activesync IP 'PPP_PEER', I get error messages.
What have I to do?
Regards