mirror of https://github.com/v2ray/v2ray-core
v2ray
9 years ago
11 changed files with 68 additions and 39 deletions
@ -0,0 +1,23 @@
|
||||
package app |
||||
|
||||
type Space struct { |
||||
packetDispatcher PacketDispatcher |
||||
} |
||||
|
||||
func NewSpace() *Space { |
||||
return new(Space) |
||||
} |
||||
|
||||
func (this *Space) HasPacketDispatcher() bool { |
||||
return this.packetDispatcher != nil |
||||
} |
||||
|
||||
func (this *Space) PacketDispatcher() PacketDispatcher { |
||||
return this.packetDispatcher |
||||
} |
||||
|
||||
func (this *Space) Bind(object interface{}) { |
||||
if packetDispatcher, ok := object.(PacketDispatcher); ok { |
||||
this.packetDispatcher = packetDispatcher |
||||
} |
||||
} |
Loading…
Reference in new issue