#1 2022-07-01 18:27:12

jars
Member
Registered: 2015-05-15
Posts: 29

TWebSocket Server, exchanging data with each connection not broadcast

Hello, I have inherited an app that uses "TWebSocketServer", it receives and sends data to all connected clients but now I need to be able to identify each client and, depending on the case, send data only to one of them and not to all of them. Is there an example to do this?
Thanks in advance.

Last edited by jars (2022-07-07 13:32:23)

Offline

#2 2022-07-19 13:48:08

jars
Member
Registered: 2015-05-15
Posts: 29

Re: TWebSocket Server, exchanging data with each connection not broadcast

ab, is there someone who can help me?

Offline

#3 2022-07-19 15:47:40

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,240
Website

Re: TWebSocket Server, exchanging data with each connection not broadcast

There is no such example at low-level TWebSocketServer.
There are samples about interface-based services over Websockets which does the same, but not the raw server.

It is up to you to maintain a list of connected clients and manage it.

Online

#4 2022-07-22 16:21:15

jars
Member
Registered: 2015-05-15
Posts: 29

Re: TWebSocket Server, exchanging data with each connection not broadcast

ab, Could you give me an idea of how to deal with what you say about interface-based services over Websockets?
Thanks in advance.

Offline

#5 2022-07-22 16:36:38

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,240
Website

Re: TWebSocket Server, exchanging data with each connection not broadcast

There is a sample folder about interface-based services and websockets.

Also look at the documentation, which has extensive information about them.

Online

Board footer

Powered by FluxBB