Hi Johan,
On 31.10.13 01:36, Johan Maasing wrote:
> A while back I played around with grizzly for a hobby project, a small
> TCP based game server.
> I could get the filter approach working fine between clients and
> server. A client sent a message and a filter chain on the server
> responded. I used this to handle the sign-in flow where a client
> logged in to the game server.
>
> But I got sort of stuck when I wanted the server to send game update
> messages to one or more clients. Now there was no FilterChainContext I
> could use to write to the client since the server was the one
> initiating sending messages.
> I tried to extract the Connection from the FilterChainContext during
> the sign-in and keep around to send messages to clients later on but
> that never worked.
>
> What type of design should I use for this scenario? Are the filter
> chains still appropriate? How do I get a Connection (or similar) to
> the client?
It should work with Connections, strange it didn't work for you.
Which Grizzly version are you using?
Thanks.
WBR,
Alexey.