Jump to content

How to Create an event from inside a thread


RobertoLopes

Recommended Posts

Here is what I need.

 

We have a socket comunication with our telephony servers (each session has it's on socket connection) and we need to update the form every time an event is triggered (message received on the socket). Since that the sockets are on a separate thread, If i try to do this from inside the thread unigui throws an exception. So I need to create an event to I can update the screen immediately without need a timer to do so.

Is this possible ? If yes, anyone have an example of how to do that ?

Link to comment
Share on other sites

6 hours ago, Freeman35 said:

Uma boa idéia é: adicione uma propriedade de string no MainModule e defina a função Set_xxx, para que possamos definir essa propriedade a partir do thread, mas obter valor no thread através da função "Set_xxx". Para que possamos concluir sessões.

how would it be?

Link to comment
Share on other sites

15 hours ago, wilton_rad said:

 

I already tried to use sockets tcp ip within uni, to send messages, but the message to create a chat, but the message only goes to a vcl recipient, could not get back, just because everything is executed in threads,

We have developed a library that works really really well with sockets in Unigui.

We have a comercial grade chat developed in Unigui with thousands of users. It works really well the way it is. What I was wondering is that if there was no other way than use timers to perform screen updates that occur inside my socket thread. But as I see there isn't.

 

Link to comment
Share on other sites

4 hours ago, RobertoLopes said:

Nós desenvolvemos uma biblioteca que funciona realmente muito bem com soquetes no Unigui.

Temos um bate-papo de nível comercial desenvolvido em Unigui com milhares de usuários. Funciona muito bem do jeito que está. O que eu queria saber é que, se não houvesse outra maneira, use temporizadores para executar atualizações de tela que ocorrem dentro do meu thread de soquete. Mas, como vejo, não há.

 

 

you market this chat solution through unigui

Link to comment
Share on other sites

6 minutes ago, RobertoLopes said:

Ahh entao. O que você quis dizer com "you market this chat solution through unigui" ?

se voce vende essa solução de chat que voce fez para unigui. em vcl uso um componente do ipworks para enviar mensagens na rede, e preciso de uma solucao para unigui.

 

Link to comment
Share on other sites

A solucao de Chat faz parte de uma solucao maior para atendimento (Voz, Video, Whatsapp, Webchat, etc). Eu criei uma biblioteca em C++ (winsock) que roda em uma thread separada e gerencia todas as conexoes e atualiza variaveis que por sua vez sao consultadas dentro do timer e atualizam a tela. Por isso fiz a pergunta. 

Posso ajudar você sim a criar sua propria biblioteca mas não tenho como vender essa.

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...