add connection padding on server side

This commit is contained in:
Shelikhoo 2025-01-29 11:46:33 +00:00
parent 53172a588b
commit 0aa1470e01
No known key found for this signature in database
GPG key ID: 4C9764E9FE80A3DC
3 changed files with 24 additions and 4 deletions

View file

@ -7,6 +7,17 @@ type ReadWriteCloserPreservesBoundary interface {
MessageBoundaryPreserved()
}
type messageBoundaryPreservedReadWriteCloser struct {
io.ReadWriteCloser
}
func (m *messageBoundaryPreservedReadWriteCloser) MessageBoundaryPreserved() {
}
func ConfirmsReadWriteCloserPreservesMessageBoundary(rwc io.ReadWriteCloser) ReadWriteCloserPreservesBoundary {
return &messageBoundaryPreservedReadWriteCloser{rwc}
}
type PaddableConnection interface {
ReadWriteCloserPreservesBoundary
}