Currently im working on a game theres need to access a server through a UDP stream I have try lot difference things for get this to work, none so far working. What I need to do is make a udp stream. Send a msg to the host. Receive msg. The first two things are working perfectly the last, receiveing a msg is making a Memory access Violation. Heres my c/p code so far.
; Init streaming.
stream = CreateUDPStream()
If Not stream Then error("could't connect To host.")
WriteLine stream,"hello world"
CountHostIPs("127.0.0.1")
SendUDPMsg stream,HostIP(1),1989
While (True)
Delay(1000)
recv = RecvUDPMsg(stream)
If recv <> 0 Then
msg$ = ReadString(stream)
Print(msg$)
EndIf
Wend
The server is fully tested, I used nc for test it and its the not issue.
Regards
; Init streaming.
stream = CreateUDPStream()
If Not stream Then error("could't connect To host.")
WriteLine stream,"hello world"
CountHostIPs("127.0.0.1")
SendUDPMsg stream,HostIP(1),1989
While (True)
Delay(1000)
recv = RecvUDPMsg(stream)
If recv <> 0 Then
msg$ = ReadString(stream)
Print(msg$)
EndIf
Wend
The server is fully tested, I used nc for test it and its the not issue.
Regards