cforth
cforth copied to clipboard
ESP8266 test-socket.fth
I notice that Mitch has pushed an example file (test-socket.fth) to the repo.
As I understand it the test word "probe-ssh" sets up a a bunch of callbacks connects to the ssh port of a given machine, displays the string return by ssh and disconnects.
This works fine.
I have modified it to connect to a custom socket server. The connect callback sends "PING\n" and the server responds with "Pong!\n", and disconnects.
This too works fine.
I have made the changes to set respond to a callback that simply displays the stack and put false on the stack. With just this change it works.
What I am struggling with is sending a subsequent command and getting the response.
If at the prompt I send a second command (e.g. " PING"n" server-pcb tcp-write .) I get 0 o/p then
ok Tried to execute a null token
Any advice Mitch ?
Regards, Andrew
You could try "debug receiver" before issuing the second command.