Example #1
0
        public static INetworkServerBuilder UseZeroFormatter(this INetworkServerBuilder serverBuilder)
        {
            var serviceCollection = serverBuilder.GetServiceCollection();

            serviceCollection.AddSingleton <IPacketSerialiser, ZeroFormatterPacketSerialiser>();

            return(serverBuilder);
        }
Example #2
0
        public static INetworkServerBuilder UseProtobufNet(this INetworkServerBuilder serverBuilder)
        {
            var serviceCollection = serverBuilder.GetServiceCollection();

            serviceCollection.AddSingleton <IPacketSerialiser, ProtoBufNetSerialiser>();

            return(serverBuilder);
        }