Azure / DotNetty

DotNetty project – a port of netty, event-driven asynchronous network application framework
Other
4.09k stars 977 forks source link

channel attributes ReadOnly #258

Closed ukluk closed 7 years ago

ukluk commented 7 years ago

Is it possible to use Attributes as a property bag to store metadata related to each session? The only exposed methods are HasAttributes and GetAttribute. It is missing a public "SetAttribute"

The use case is: After Authentication, find some decorator information from the database (I/O) and reuse it for each received message in the entire session per channel.

nayato commented 7 years ago

it is settable: call GetAttribute(..), then call Set on returned attribute object: https://github.com/Azure/DotNetty/blob/dev/src/DotNetty.Common/Utilities/IAttribute.cs#L23