prefer interface over struct

This commit is contained in:
V2Ray committed 2015-09-20 18:22:29 +02:00
1 parent 823cbf1509
commit cb16047cf0
12 files changed
+88 -59

No files matched your search

+2 -2
View File
@@ -64,7 +64,7 @@ type InboundConnectionHandler interface {
}
type OutboundConnectionHandlerFactory interface {
Create(VP *Point, config []byte, dest *v2net.Destination) (OutboundConnectionHandler, error)
Create(VP *Point, config []byte, dest v2net.Destination) (OutboundConnectionHandler, error)
}
type OutboundConnectionHandler interface {
@@ -85,7 +85,7 @@ func (vp *Point) Start() error {
return nil
}
func (vp *Point) NewInboundConnectionAccepted(destination *v2net.Destination) InboundRay {
func (vp *Point) NewInboundConnectionAccepted(destination v2net.Destination) InboundRay {
ray := NewRay()
// TODO: handle error
och, _ := vp.ochFactory.Create(vp, vp.ochConfig, destination)