mirror of
https://github.com/S7NetPlus/s7netplus.git
synced 2026-02-17 14:28:25 +08:00
refactor: Use Word.ToByteArray in WriteTpktHeader
This commit is contained in:
@@ -12,7 +12,7 @@ namespace S7.Net
|
||||
private static void WriteTpktHeader(System.IO.MemoryStream stream, int length)
|
||||
{
|
||||
stream.Write(new byte[] { 0x03, 0x00 });
|
||||
stream.Write(Int.ToByteArray((short)length));
|
||||
stream.Write(Word.ToByteArray((ushort) length));
|
||||
}
|
||||
|
||||
private static void WriteDataHeader(System.IO.MemoryStream stream)
|
||||
|
||||
Reference in New Issue
Block a user