zamazan4ik / aws-gamelift-server-sdk-rs

MIT License
5 stars 1 forks source link

Follow-up to SDK version 5 and support GameLift Anywhere #9

Open B-head opened 1 year ago

B-head commented 1 year ago

I intended to deal with just GameLift Anywhere, but had to rewrite most of the code.

Resolve #8.

Change in follow-up to SDK version 5

API improvements

Organize module layout (Overall)

Simplify callback construction of ProcessParameters

Until now:

on_update_game_session: Box::new(|update_game_session| {
    Box::pin(async move { log::info!("{:?}", update_game_session) })
}),

From now on:

on_update_game_session: |update_game_session| async move {
    log::info!("{:?}", update_game_session)
},

Channel-based event handling

Construct ProcessParameters with the channel bind to callbacks is a simpler way to handle server events. See examples/channel.rs example for details.

Not yet implemented

zamazan4ik commented 1 year ago

@B-head thanks a lot for the contribution!

Let me know, then the PR will be ready for review.