RobertoLopes Posted January 2, 2020 Share Posted January 2, 2020 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 ? Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted January 3, 2020 Share Posted January 3, 2020 Can good idea is, Add a string property in MainModule, and it set to Set_xxx function, so we can set this property from out of thread but get value in thread via "Set_xxx" function. So we can cominicate sessions. 1 Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted January 3, 2020 Share Posted January 3, 2020 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? Quote Link to comment Share on other sites More sharing options...
Wilton Ergon Posted January 7, 2020 Share Posted January 7, 2020 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, Quote Link to comment Share on other sites More sharing options...
RobertoLopes Posted January 8, 2020 Author Share Posted January 8, 2020 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. Quote Link to comment Share on other sites More sharing options...
Wilton Ergon Posted January 8, 2020 Share Posted January 8, 2020 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 Quote Link to comment Share on other sites More sharing options...
RobertoLopes Posted January 8, 2020 Author Share Posted January 8, 2020 7 minutes ago, wilton_rad said: you market this chat solution through unigui Você é do Brasil ? Notei que traduz os posts por isso a pergunta. Quote Link to comment Share on other sites More sharing options...
Wilton Ergon Posted January 8, 2020 Share Posted January 8, 2020 yes. Quote Link to comment Share on other sites More sharing options...
RobertoLopes Posted January 8, 2020 Author Share Posted January 8, 2020 3 minutes ago, wilton_rad said: yes. Ahh entao. O que você quis dizer com "you market this chat solution through unigui" ? Quote Link to comment Share on other sites More sharing options...
Wilton Ergon Posted January 8, 2020 Share Posted January 8, 2020 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. Quote Link to comment Share on other sites More sharing options...
RobertoLopes Posted January 8, 2020 Author Share Posted January 8, 2020 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.