flowpowered / network

Networking library for the Flow collection.
https://flow.github.io/network
MIT License
27 stars 18 forks source link

Define ChannelGroups in implementations #3

Closed Zidane closed 10 years ago

Zidane commented 10 years ago

So I've been doing more work on my server implementation but simply storing sessions is not enough due to the fact that I only know if a session is actually valid when receiving the second packet. I am also hitting a brick wall due to the fact that I need to manually read messages (AUTO_READ OFF) for the first 2-4 packets (based on if encryption is on or off).

Long story short, I need to know of the channels connected to my server so I can find the ones I need to disconnect in a situation where I haven't stored the session (as I don't know if its valid yet) but I need to perform a read on the channel to get the packet to see if it will be a valid session.

kitskub commented 10 years ago

Netty has this already. Doesn't belong in flow-networking: http://netty.io/4.0/api/io/netty/channel/group/ChannelGroup.html