looking for example code for time server
Re: looking for example code for time server
@Andreas
there seems to be a limitation 8192 max is it possible to have more?
there seems to be a limitation 8192 max is it possible to have more?
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: looking for example code for time server
Can't reproduce this here. What system did you test this on?
This is a lot of work because it would require ReceiveUDPData() to support lots of stuff like window event handling in case it blocks for a longer time or user progress callbacks. I don't really think that's worth the effort. You can just read in smaller chunks. It's very simple to do that.
Re: looking for example code for time server
windows 7 64 bitairsoftsoftwair wrote: ↑Wed Oct 28, 2020 10:59 pmCan't reproduce this here. What system did you test this on?
Christos
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: looking for example code for time server
server from here
viewtopic.php?p=7611#p7611
posted again
server (from andreas post)
client with problem
viewtopic.php?p=7611#p7611
posted again
server (from andreas post)
Code: Select all
af = CreateUDPObject(Nil, 12345)
DebugPrint(GetLocalPort(af, #NETWORKUDP))
InstallEventHandler({onreceiveudpdata = Function(msg)
DebugPrint(msg.action, ReceiveUDPData(af))
EndFunction})
Repeat
WaitEvent
Forever
Code: Select all
; Client example from above test files
CreateUDPObject(1)
InstallEventHandler({onkeyup = Function(msg)
;SendUDPData(1, ByteChr(65), "127.0.0.1", 12345) ; <- OK
SendUDPData(1, ByteChr(128), "127.0.0.1", 12345) ; <-NOT OK
EndFunction})
Repeat
WaitEvent
Forever
Christos
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: looking for example code for time server
Works here on Windows 7. How do you test this? From the Hollywood IDE or a console? What is the exact error message?
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: looking for example code for time server
It's a bug in WinUAE's bsdsocket.library. It doesn't appear on real hardware or on OS4 or MorphOS. I've reported it to Toni Wilen and he has fixed it, see here for a fixed WinUAE binary: http://eab.abime.net/showthread.php?t=104569
Re: looking for example code for time server
yes via ideairsoftsoftwair wrote: ↑Thu Oct 29, 2020 5:27 pm Works here on Windows 7. How do you test this? From the Hollywood IDE or a console? What is the exact error message?
when receiving data in debug window (bottom) says "Received ... A adasd" (when you send character A)
when receiving data with >127 as first bytw the above line DO NOT appears at all
Christos
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: looking for example code for time server
Code: Select all
- Fix [IDE]: Hollywood output that didn't contain valid UTF-8 wasn't shown in the debug window; the IDE
will now assume that the text is ISO 8859-1 encoded in such cases