||Re: Error in websocket
Boris Borzic <bb> <Boris Borzic <bb>>
||Wed, 19 Jun 2019 14:55:07 +0200
Robert Diaz <> wrote in news:g3s3ak5nsatnyva.190620191318@daz17:
>> > The most likely reason for the error is your code is not
>> > thread-safe. The websocket function is executing code in a
>> > different thread from the GUI components. You need to create some
>> > type of mutex.
>> How to create mutex in my function? Shall i get some samples?
> My socket object(osock) is instance of xbwebsocket class,i think it's
> not thread safe. Do I need to change it to xbsocketThread class ?How
> i will do that?Any example program using this class?
The problem is *NOT* in xbWebSocket. The problem is in the way you are
Suggest your read up on the "Multi-tasking and Multi-threading" + "Mutual
exclusion of threads" in Xbase++ documentation.
The GUI components in Xbase++ run in their own independent thread. It looks
like you are manipulating the Xbase++ GUI components from different
threads. This is likely what is causing the error. It also begs the
question why you need to have a GUI on the server-side.
Server applications should be as simple as possible! Most run as a windows
service with no direct GUI. A user interface for the service is usually
provided through a secondary helper application or via a web browser.
industrial strength Xbase++ development tools