close method for point server

This commit is contained in:
v2ray committed 2016-01-04 00:33:25 +01:00
1 parent 201481a82c
commit 56c5302367
11 files changed
+80 -49

No files matched your search

+6
View File
@@ -39,6 +39,12 @@ func (this *InboundDetourHandler) Initialize() error {
return nil
}
func (this *InboundDetourHandler) Close() {
for _, ich := range this.ich {
ich.handler.Close()
}
}
// Starts the inbound connection handler.
func (this *InboundDetourHandler) Start() error {
for _, ich := range this.ich {
+7
View File
@@ -113,6 +113,13 @@ func NewPoint(pConfig PointConfig) (*Point, error) {
return vpoint, nil
}
func (this *Point) Close() {
this.ich.Close()
for _, idh := range this.idh {
idh.Close()
}
}
// Start starts the Point server, and return any error during the process.
// In the case of any errors, the state of the server is unpredicatable.
func (this *Point) Start() error {