Page 2 of 2

Re: looking for example code for time server

Posted: Tue Oct 27, 2020 10:10 am
by sinisrus
@Andreas

there seems to be a limitation 8192 max is it possible to have more?

Re: looking for example code for time server

Posted: Wed Oct 28, 2020 10:59 pm
by airsoftsoftwair
plouf wrote:
Mon Oct 19, 2020 6:07 am
receiveudp data(af)
Can't reproduce this here. What system did you test this on?
sinisrus wrote:
Tue Oct 27, 2020 10:10 am
there seems to be a limitation 8192 max is it possible to have more?
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

Posted: Wed Oct 28, 2020 11:00 pm
by plouf
airsoftsoftwair wrote:
Wed Oct 28, 2020 10:59 pm
plouf wrote:
Mon Oct 19, 2020 6:07 am
receiveudp data(af)
Can't reproduce this here. What system did you test this on?
windows 7 64 bit

Re: looking for example code for time server

Posted: Wed Oct 28, 2020 11:03 pm
by airsoftsoftwair
plouf wrote:
Wed Oct 28, 2020 11:00 pm
windows 7 64 bit
Weird. What server code did you use?

Re: looking for example code for time server

Posted: Wed Oct 28, 2020 11:13 pm
by plouf
server from here
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
client with problem

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

Re: looking for example code for time server

Posted: Thu Oct 29, 2020 5:27 pm
by airsoftsoftwair
Works here on Windows 7. How do you test this? From the Hollywood IDE or a console? What is the exact error message?

Re: looking for example code for time server

Posted: Fri Nov 06, 2020 8:50 pm
by airsoftsoftwair
sinisrus wrote:
Wed Oct 14, 2020 11:30 pm
WinUAE
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

Posted: Sat Nov 07, 2020 9:23 am
by plouf
airsoftsoftwair 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?
yes via ide

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

Re: looking for example code for time server

Posted: Wed Nov 11, 2020 2:39 pm
by airsoftsoftwair

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