1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

Remove XTLS WriteMultiBuffer method

This commit is contained in:
RPRX 2020-10-13 04:33:11 +00:00 committed by GitHub
parent cc0f6e6a07
commit d1ed330f9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,27 +5,15 @@ package xtls
import (
xtls "github.com/xtls/go"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/net"
)
//go:generate go run v2ray.com/core/common/errors/errorgen
var (
_ buf.Writer = (*Conn)(nil)
)
type Conn struct {
*xtls.Conn
}
func (c *Conn) WriteMultiBuffer(mb buf.MultiBuffer) error {
mb = buf.Compact(mb)
mb, err := buf.WriteMultiBuffer(c, mb)
buf.ReleaseMulti(mb)
return err
}
func (c *Conn) HandshakeAddress() net.Address {
if err := c.Handshake(); err != nil {
return nil