Giter Site home page Giter Site logo

Functions for game-server about luasteam HOT 3 CLOSED

uspgamedev avatar uspgamedev commented on May 25, 2024
Functions for game-server

from luasteam.

Comments (3)

yancouto avatar yancouto commented on May 25, 2024 1

Should be possible, yes. I'd be glad to review PRs. Take a look at our CONTRIBUTING.md.

If you take a look at Steam documentation, HAuthTicket is an identifier, and uint32. It is fine to use our uint64 metadata in this case.

What's a little more confusing is the "ticket" information returned. It seems on C++ you pass in a void pointer and a maximum size, and it returns the actual size. I assume that this is just any blob of information (an array of bytes). Luckily, in Lua strings can hold arbitrary data (they can have zeroes in the middle, unlike usual C strings). So you should be able to return a string for that call, in our C++ code you can use something like lua_pushlstring.

I imagine the API for GetAuthSessionToken would look something like this:

user.getAuthSessionToken(maxLength)

Parameters:
 - (number) maxLength - Maximum possible size of the auth ticket returned. Defaults to 1024, which should be enough.
 Return:
- (unit64) ID of the ticket (this is the HAuthTicket)
- (string) The auth ticket, encoded as a string. It may have zeroes in its representation.

I'm not sure how you will be using this string, and not sure what guarantees Steam gives about this (if it can be nicely printed or not), but if Steam doesn't give any guarantees, you might need to be careful when sending this through the network (which I guess is what you want), depending on how you send it.

from luasteam.

Lua200 avatar Lua200 commented on May 25, 2024

Thank you :)

I will try to implement it and tell u if it works :D

from luasteam.

yancouto avatar yancouto commented on May 25, 2024

Closing for inactivity. Feel free to reopen if you have more doubts.

from luasteam.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.