Indy9 - how to maintain user information on a UDP server

Giganews Newsgroups
Subject: Indy9 - how to maintain user information on a UDP server
Posted by:  York (offi…@onlinebg.info)
Date: Wed, 21 Mar 2007

Hello
In an Indy9 TCP server I use the connection to maintain some persistent user
information for each connection.
Now I need to do something similar with an UDP server.
The problem however is that I do not have a connection object because of the
connectionless nature of that protocol.
Could you give me a suggestion of how/where I can store some info on the
server so that each new datagram from one and the same user could be related
to it.
For example:
1. A datagram received by a user
2. The server stores this datagram in a user queue
3. A new datagram received from the same user.
4. The server finds this same queue and adds the datagram to it.

Currently (TCP implementation) I have a custom thread class and I have a
per-user queue. Could I do something similar with a TUDPServer

Your feedback appreciated.
Thank you

Replies