add SLIP framing

This commit is contained in:
Joel Wetzell
2025-11-18 21:30:06 -06:00
parent 86966132ca
commit 8e0f25abe9
3 changed files with 56 additions and 0 deletions

View File

@@ -67,6 +67,8 @@ func (ts TCPServer) HandleClient(ctx context.Context, client net.Conn) {
framer = framing.NewByteSeparatorFramer([]byte{'\r'})
case "CRLF":
framer = framing.NewByteSeparatorFramer([]byte{'\r', '\n'})
case "SLIP":
framer = framing.NewSlipFramer()
}
buffer := make([]byte, 1024)