B4J Question Using Socket/AStreams with Console

Gary Miyakawa

Active Member
Licensed User
Longtime User
I'm attempting to take one of my programs that read/write telnet running JavaFX and making it run in the Console only side. Basically, I'm trying to move it to a RPi3.

I've removed all the JavaFX stuff and replaced the output side with log messages.

The program starts, does the "Connect to Host" (Socket1_Connect) but I never get the callback to "Socket1_Connected" like I do if I'm running it with JavaFX

Seem like it's not waiting for the response.

Can someone clue me into what I'm missing ?

Thanks,

Gary Miyakawa
 

Roycefer

Well-Known Member
Licensed User
Longtime User
You probably forgot to call StartMessageLoop. B4J UI apps start their message loops automatically but you have to explicitly call StartMessageLoop in non-UI apps. Do this at the end of AppStart().
 
Upvote 0

Gary Miyakawa

Active Member
Licensed User
Longtime User
You probably forgot to call StartMessageLoop. B4J UI apps start their message loops automatically but you have to explicitly call StartMessageLoop in non-UI apps. Do this at the end of AppStart().


Yep, that was it! Thank you so much !

Gary M
 
Upvote 0
Top