Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous Fixes #293

Merged
merged 21 commits into from
Oct 22, 2024
Merged

Miscellaneous Fixes #293

merged 21 commits into from
Oct 22, 2024

Conversation

LossyDragon
Copy link
Collaborator

Description

Kind of a big PR, nearly all the commits are just nit-fixes, cleanup, and to be more on par with SK. Changes have been in used in the 1.6.0-SNAPSHOT with no reported issues.

Changes/Fixes in no particular order

  • (Add) logging for the response in CMClient handleLogOnResponse and handleLoggedOff.
  • (Add) macOS15 in Utils.getOSType().
  • (Add) basic PICS sample app.
  • (Add) BinaryReader readNullTermUtf8String method
  • (Fix) PICSProductInfo not rendering UTF8 text properly.
  • (Fix) disconnect the client if steam closes the connection first in WebSocket. If the close connection request is 1000, this will be a userInitiated disconnection.
  • (Modify) port NetHelpers to kotlin and add missing helper functions that were in SK. Including some ipv6 support.
  • (Modify) port KVTextReader to kotlin. Replacing PushbackInputStream with InputStreamReader for charset support.
  • (Modify) port Passable to kotlin.
  • (Modify) use UTF8 as the standard charset in AbstractMsgBase and BinaryReader.
  • (Modify) Don't throw in most handlers if parsing failed. Instead log it to logger.error and continue with default value. This allows the remaining values that aren't affected to be used.
  • (Modify) use US_ASCII for LegacyGameKeyCallback key string.
  • (Modify) MemoryStream can take a ByteString constructor
  • (Modify) SteamAuthentication getPasswordRSAPublicKey and beginAuthSessionViaCredentials takes a non-null parameter.
  • (Modify) WebSocketConnection getLocalIP returns a 0.0.0.0 InetAddress. This is similar to IPAddress.None SK uses.
  • (Remove) EResultDeserializer. This was unused for a long time.
  • (Add) various test cases.
  • (Misc) label TODO's with SK if SteamKit still has the same todo's.
  • (Misc) use Property Access Syntax for setters in kotlin classes.
  • (Misc) kDoc tweaks.

Checklist

  • Code compiles correctly
  • All tests passing
  • Samples run successfully
  • Extended the README / documentation, if necessary

Port KVTextReader to kotlin while replacing PushbackInputStream with InputStreamReader
BinaryReader.readNullTermUtf8String breaks instead of throwing, update it's test.
Use Property Access Syntax for fields in kotlin.
Don't throw in handlers. Instead, log it to 'error' since some callbacks can have valid data or continue with an empty list of the data that failed.
KeyValue.tryReadAsBinary can throw IllegalArgumentException and IOException.
Use US_ASCII formatting for LegacyGameKeyCallback.key
MemoryStream can take a ByteString constructor.
SteamAuthentication.getPasswordRSAPublicKey takes non-null accountName.
SteamAuthentication.beginAuthSessionViaCredentials takes non-null authSessionDetails.
Setters that work with ip related values use NetHelpers functions.
WebSocketConnection.getLocalIP returns 0.0.0.0 InetAddress.
@LossyDragon LossyDragon merged commit ad7377f into Longi94:master Oct 22, 2024
1 check passed
@LossyDragon LossyDragon deleted the misc-v2 branch October 22, 2024 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant