B4J Question [SOLVED] socket fails in multithread server

mc73

Well-Known Member
Licensed User
Longtime User
I noticed in server's tutorial that using printers should be placed in single-thread handlers of server.
I didn't pay much attention to this, and ended up with a print failure.
While the attached zip demonstrates the problem, I wonder whether there is a work-around without setting the single-thread option to true. For example if I could simpy place a call to the main module and initialize the print class from there.
 

Attachments

  • b4jTestSocketsInMultiThreadServer.zip
    2 KB · Views: 183

mc73

Well-Known Member
Licensed User
Longtime User
Indeed that solved the issue, thank you! However, I have another question: While in messageLoop, can other connections be established (server connections) or they will be blocked till we stopMessageLoop?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…