NotifyServerPacket calls OnServerPacket callback for Long Header packets. Used to learn new SCIDs from the server during handshake.
(packet []byte)
| 130 | // NotifyServerPacket calls OnServerPacket callback for Long Header packets. |
| 131 | // Used to learn new SCIDs from the server during handshake. |
| 132 | func (c *Context) NotifyServerPacket(packet []byte) { |
| 133 | if c.OnServerPacket != nil && len(packet) > 0 && (packet[0]&0x80) != 0 { |
| 134 | // Only call for Long Header packets (first bit = 1) |
| 135 | c.OnServerPacket(packet) |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | // Drop immediately removes the session from the proxy. |
| 140 | // Safe to call multiple times (idempotent) and from any goroutine. |