     */
     public func start_socket() -> Promise<Bool> {
         
+        self.socket = SocketIOClient(socketURL: hostUrl, options: ["log": true,
+            "reconnects": true,
+            "reconnectAttempts": 5,
+            "reconnectWait": 5,
+            "connectParams": ["token":tokenSDK]])
+        
         //init channels
-        organizationChannel = OrganizationChannel(socket: self.socket)
-        systemChannel = SystemChannel(socket: self.socket)
-        locationChannel = LocationChannel(socket: self.socket)
-        experienceChannel = ExperienceChannel(socket: self.socket)
+        organizationChannel = OrganizationChannel(socket: self.socket!)
+        systemChannel = SystemChannel(socket: self.socket!)
+        locationChannel = LocationChannel(socket: self.socket!)
+        experienceChannel = ExperienceChannel(socket: self.socket!)
         
         return Promise { fulfill, reject in
-            self.socket.on("connect") {data, ack in
+            self.socket!.on("connect") {data, ack in
                 fulfill(true)
                 if((self.connection.indexForKey(Config.ONLINE)) != nil){
                     let callBack = self.connection[Config.ONLINE]!


public  class SocketManager {
    
    public var socket = SocketIOClient(socketURL: hostUrl, options: ["log": false,
        "reconnects": true,
        "reconnectAttempts": 5,
        "reconnectWait": 5,
        "connectParams": ["token":tokenSDK]])
    
    var organizationChannel: OrganizationChannel?
    var locationChannel:LocationChannel?


                }
            }
            self.socket!.connect()
        }
        
    }
