TcpProtocolFlags.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace RemotingProtocolParser.TCP
  5. {
  6. //MS .Net Remoting Core Protocol
  7. //http://msdn.microsoft.com/en-us/library/cc237297(v=prot.20).aspx
  8. public class TcpHeaders
  9. {
  10. public const ushort EndOfHeaders = 0;
  11. public const ushort Custom = 1;
  12. public const ushort StatusCode = 2;
  13. public const ushort StatusPhrase = 3;
  14. public const ushort RequestUri = 4;
  15. public const ushort CloseConnection = 5;
  16. public const ushort ContentType = 6;
  17. }
  18. public class TcpHeaderFormat
  19. {
  20. public const byte Void = 0;
  21. public const byte CountedString = 1;
  22. public const byte Byte = 2;
  23. public const byte UInt16 = 3;
  24. public const byte Int32 = 4;
  25. }
  26. public class TcpStringFormat
  27. {
  28. public const byte Unicode = 0;
  29. public const byte UTF8 = 1;
  30. }
  31. public class TcpOperations
  32. {
  33. public const ushort Request = 0;
  34. public const ushort OneWayRequest = 1;
  35. public const ushort Reply = 2;
  36. }
  37. public class TcpContentDelimiter
  38. {
  39. public const ushort ContentLength = 0;
  40. public const ushort Chunked = 1;
  41. }
  42. }