Where to put server-side code?

I followed this nice tutorial: A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums
It was helpful and allowed me to set up a standalone server, but I would like to be able to set up different sessions and matchmaking instead of players automatically joining one session.
I’ve checked this page:, which gives me some vague idea about the code necessary, for example:


But I’ve no idea where to actually place the code. Should it go in a game mode, or something?
Also, I’m guessing that functions like


are called on the client?
Many thanks for any help.