Maybe I'm doing something wrong, but in 8.1.6 running in Sierra 10.12.6, trying to read just 1 character doesn't seem to work like it does in 6.1.1. Either I'm an idiot (possible) or nobody is using sockets with the "for count" option, and the engine is busted. I'm worried about these kinds of bugs, because my program controls a 42 ton telescope.
For example, this snippet should read just 1 character. I'm using nc and telnet, and the whole string is placed in dat instead of 1 character. What am I doing wrong? It works in 6.1.1.
Code: Select all
on openstack
startGUIDER
end openstack
on startGUIDER
accept connections on port 22401 with message gotGUIDER
end startGUIDER
on gotGUIDER IP, port
read from socket IP for 1 with message readGUIDER
end gotGUIDER
on readGUIDER IP,dat
put IP && "DAT" && dat
end readGUIDER