mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-18 07:17:32 -05:00
refactor
This commit is contained in:
parent
ec0986d6a9
commit
6a640cf32d
@ -34,47 +34,47 @@ type ServerConnection struct {
|
|||||||
closer io.Closer
|
closer io.Closer
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ServerConnection) Overhead() int {
|
func (c *ServerConnection) Overhead() int {
|
||||||
return o.writer.Overhead()
|
return c.writer.Overhead()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ServerConnection) Read([]byte) (int, error) {
|
func (*ServerConnection) Read([]byte) (int, error) {
|
||||||
panic("KCP|ServerConnection: Read should not be called.")
|
panic("KCP|ServerConnection: Read should not be called.")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ServerConnection) Write(b []byte) (int, error) {
|
func (c *ServerConnection) Write(b []byte) (int, error) {
|
||||||
return o.writer.Write(b)
|
return c.writer.Write(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ServerConnection) Close() error {
|
func (c *ServerConnection) Close() error {
|
||||||
return o.closer.Close()
|
return c.closer.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ServerConnection) Reset(input func([]Segment)) {
|
func (*ServerConnection) Reset(input func([]Segment)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ServerConnection) LocalAddr() net.Addr {
|
func (c *ServerConnection) LocalAddr() net.Addr {
|
||||||
return o.local
|
return c.local
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ServerConnection) RemoteAddr() net.Addr {
|
func (c *ServerConnection) RemoteAddr() net.Addr {
|
||||||
return o.remote
|
return c.remote
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ServerConnection) SetDeadline(time.Time) error {
|
func (*ServerConnection) SetDeadline(time.Time) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ServerConnection) SetReadDeadline(time.Time) error {
|
func (*ServerConnection) SetReadDeadline(time.Time) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ServerConnection) SetWriteDeadline(time.Time) error {
|
func (*ServerConnection) SetWriteDeadline(time.Time) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *ServerConnection) Id() internal.ConnectionID {
|
func (c *ServerConnection) Id() internal.ConnectionID {
|
||||||
return o.id
|
return c.id
|
||||||
}
|
}
|
||||||
|
|
||||||
// Listener defines a server listening for connections
|
// Listener defines a server listening for connections
|
||||||
|
Loading…
Reference in New Issue
Block a user