예제 #1
0
        public override int ReadFrom(byte[] Buffer, int StartIndex = 0)
        {
            int cursor = StartIndex;

            if ((UserCommandType)Buffer[cursor] != CommandType)
            {
                throw new Exception(ERRORWRONGTYPEBYTE);
            }
            else
            {
                cursor++;
                ClientPreferences = new PreferencesFlags(Buffer, cursor);
                cursor           += TypeSizes.INT;
            }

            return(cursor - StartIndex);
        }
예제 #2
0
 public UserCommandSendPreferences(PreferencesFlags ClientPreferences)
 {
     this.ClientPreferences = ClientPreferences;
 }
예제 #3
0
 public UserCommandReceivePreferences(PreferencesFlags ClientPreferences)
 {
     this.ClientPreferences = ClientPreferences;
 }