Struct steamworks::Server [] [src]

pub struct Server { /* fields omitted */ }

The main entry point into the steam client for servers.

This provides access to all of the steamworks api that servers can use.

Methods

impl Server
[src]

[src]

Attempts to initialize the steamworks api and returns a server to access the rest of the api.

This should only ever have one instance per a program.

Currently the steamworks api doesn't support IPv6.

Errors

This can fail if:

  • The steam client isn't running

  • The app ID of the game couldn't be determined.

    If the game isn't being run through steam this can be provided by placing a steam_appid.txt with the ID inside in the current working directory

  • The game isn't running on the same user/level as the steam client

  • The user doesn't own a license for the game.

  • The app ID isn't completely set up.

[src]

Runs any currently pending callbacks

This runs all currently pending callbacks on the current thread.

This should be called frequently (e.g. once per a frame) in order to reduce the latency between recieving events.

[src]

Registers the passed function as a callback for the given type.

The callback will be run on the thread that run_callbacks is called when the event arrives.

[src]

Returns the steam id of the current server

[src]

Retrieve an authentication session ticket that can be sent to an entity that wishes to verify you.

This ticket should not be reused.

When creating ticket for use by the web API you should wait for the AuthSessionTicketResponse event before trying to use the ticket.

When the multiplayer session terminates you must call cancel_authentication_ticket

[src]

Cancels an authentication session ticket received from authentication_session_ticket.

This should be called when you are no longer playing with the specified entity.

[src]

Authenticate the ticket from the steam ID to make sure it is valid and not reused.

A ValidateAuthTicketResponse callback will be fired if the entity goes offline or cancels the ticket.

When the multiplayer session terminates you must call end_authentication_session

[src]

Ends an authentication session that was started with begin_authentication_session.

This should be called when you are no longer playing with the specified entity.

[src]

Sets the game product identifier.

Used by the master server for version checking. Required field but it will go away eventually.

[src]

Sets the game description.

Displayed in the steam server browser (for now). Required field but it will go away eventually.

[src]

Sets whether this server is dedicated or a listen server.

[src]

Login to a generic anonymous account

Trait Implementations

impl Clone for Server
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Send for Server
[src]

impl Sync for Server
[src]