Repository navigation
Integration - #28
Merged
Merged
Integration#28
Conversation
- Implement clientbound KeepAlivepacket
- Pass ServerService to ClientHandler - Make use of the above points in StatusRequestPacket - Refactor ServerStatus
- Add Information property to ClientHandler - Make source gen add 'new' keyword to State and Id of IPacket for packet inheritance to work without warnings
Added notes about Sharpmine.AppHost and Sharpmine.ServiceDefaults for future use.
…ually named record class
- Add static extension methdos to System.Threading.Channels.Channel itself for creating Clientbound/Serverbound channels - Make ProcessAsync take way fewer parameters and return ValueTask instead of Task since it rarely ever actually has async implementations - Move LoggerMessage partial methods to separate file if the main file got too cluttered
- Make use of System.Threading.Channels - Add static extension methdos to System.Threading.Channels.Channel itself for creating Clientbound/Serverbound channels - Make ProcessAsync take way fewer parameters and return ValueTask instead of Task since it rarely ever actually has async implementations - Move LoggerMessage partial methods to separate file if the main file got too cluttered
- Rename SwitchProtocolState to TransitionTo - Update logging messages accordingly
# Conflicts: # Sharpmine.Server/Protocol/ClientHandler.Logging.cs # Sharpmine.Server/Protocol/ClientHandler.cs # Sharpmine.Server/Protocol/ClientHandlerFactory.cs # Sharpmine.Server/Protocol/Packets/Configuration/Serverbound/FinishConfigurationPacket.cs # Sharpmine.Server/Protocol/Packets/Handshake/Serverbound/IntentionPacket.cs # Sharpmine.Server/Protocol/Packets/Login/Serverbound/LoginAcknowledgedPacket.cs
- Put parameters of ProcessAsync into a single line
- Make it read a normal Int64 (long) instead of a 7BitEncodedInt64 - Make it not disconnect as that should be handled from the client side automatically and is only necessary for legacy pings
- Add explicit interface (re-)implementations instead of "abstract-cascading" - Remove new keyword in auto-generated code to avoid warnings, as this was only required back when I used to inherit from concrete packets
- Cancel CTS only in Disconnect[Async] so that Dispose[Async] does not have to be called multiple times anymore - Add TODO in ServerService
- Disable ReSharper hint to invert it back to its original state
… and handling those transitions synchronously before even enqueueing the packet that caused the state transition - Remove 'ReSharper disable once InvertIf' in favor of just hiding the error in Rider
… the [de]serialization and processing of packets - Add ProtocolResult enum - Add ProtocolException class
…disconnect process when encountering a legacy packet, which is now handled in an entirely differnet way
- Delete ProtocolResult - Delete ProtocolException - Change return type of ProcessAsync from ProtocolResult to void - Change return type of DeserializeContent from ProtocolResult to bool - Change return type of SerializeContent from Task to void - Make SerializeContent synchronous - Make Read/WriteJson synchronous - Handle ServerboundPackets of length 0
- Move write/process task awaiting logic into finally-block
…ent tense as it is always called prior to Disconnect[Async]
- Change parameter of DisconnectAsync from string to IClientboundPacket to make the last sent packet before attempt a graceful abortion dynamic - Provide a new overload for DisconnectAsync instead, which accepts a string again and then chooses the correct way to handle it based on the current state - Add log method for disconnect requested in state no disconnect packet exists in
- Fix #20 along the way (Properly update ListViews in GUI instead of clearing and refilling them) - Fix #1 along the way (Add indicator to represent different connection states of clients in GUI) - Use ObservableCollection instead of Lists+Events - Make Program.Main synchronous to prevent STAThread error - Add System.IO to GlobalUsings.cs
#24 Drop WinForms entirely and switch to WPF - Fix #20 along the way (Properly update ListViews in GUI instead of clearing and refilling them) - Fix #1 along the way (Add indicator to represent different connection states of clients in GUI) - Use ObservableCollection instead of Lists+Events - Make Program.Main synchronous to prevent STAThread error - Add System.IO to GlobalUsings.cs
…nection is in progress - Fix race condition in SendPacket by checking _disconnecting after attempting to write
- Completely rewrite BinaryReaderExtensions to SequenceReaderExtensions - Completely rewrite BinaryWriterExtensions to BufferWriterExtensions - Move json (de)serialization logic from extensions for Stream to extensions for SequenceReader<byte>/IBufferWriter<byte> and improve underlying logic along the way - Fix #23 along the way (Get rid of delegate allocations when reading/writing optionals and arrays) - Rewrite packet deserialization using try-pattern, turning TSelf from IServerboundDataType covariant back to invariant to make it usable as an out-parameter - Make network-transmitted enums use int as underlying type again to go hand in hand with VarInt and for easier deserialization using the new logic with int as default - Fix legacy ping check for versions prior to 1.4 (which send only 0xFE with nothing after)
…ntDictionary API
- Register PacketTransmitter as transient - Register PacketReceiver as singleton - Vastly improve ClientHandlerFactory using ActivatorUtilities instead of manual instantiation
… Core as the main project This allows for other operating systems to run Sharpmine, as WPF was the only thing tying it to Windows - Adapt all namespaces and usings thereof - Add HostApplicationBuilderExtensions.AddCoreServices for easy addition of all that's necessary to integrate Sharpmine.Server.Core into a project - Improve configuration addition of server.properties, using builder.Configuration instead of a custom ConfigurationBuilder - Replace Scrutor's .FromEntryAssembly with .FromAssemblyOf<ServerService> because now the entry assembly is not the same as the one of IPacketHandler<> anymore - Upgrade dependencies and unnecessary (e.g. transient or even entirely unused) ones - Move appsettings.json and appsettings.Development.json to SharedConfig folder, sharing it between Sharpmine.Server.Console and Sharpmine.Server.Wpf
- Adapt to project restructuring - Improve general project description, adding more detailed/accurate explanations
This was
linked to
issues
May 13, 2026
Closed
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1, #8, #10, #11, #13, #16, #17, #18, #20, #23 and #24