work on fixing for latest version
This commit is contained in:
		
							parent
							
								
									6eafce0082
								
							
						
					
					
						commit
						ca4261d8ca
					
				@ -126,68 +126,40 @@
 | 
			
		||||
			remoteGlobalIDString = 576349FA1BD9B46A00E19CD7;
 | 
			
		||||
			remoteInfo = "SocketIO-tvOS";
 | 
			
		||||
		};
 | 
			
		||||
		745225EC1F1BA89E007EA874 /* PBXContainerItemProxy */ = {
 | 
			
		||||
		74B3C8391F7F3ECE007D96C8 /* PBXContainerItemProxy */ = {
 | 
			
		||||
			isa = PBXContainerItemProxy;
 | 
			
		||||
			containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */;
 | 
			
		||||
			proxyType = 2;
 | 
			
		||||
			remoteGlobalIDString = 33CCF0921F5DDC030099B092;
 | 
			
		||||
			remoteInfo = StarscreamSocketIO;
 | 
			
		||||
		};
 | 
			
		||||
		74B3C83B1F7F3ECE007D96C8 /* PBXContainerItemProxy */ = {
 | 
			
		||||
			isa = PBXContainerItemProxy;
 | 
			
		||||
			containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */;
 | 
			
		||||
			proxyType = 2;
 | 
			
		||||
			remoteGlobalIDString = 335FA2021F5DF71D00F6D2EC;
 | 
			
		||||
			remoteInfo = "Starscream Tests";
 | 
			
		||||
		};
 | 
			
		||||
		74B3C8411F7F3F93007D96C8 /* PBXContainerItemProxy */ = {
 | 
			
		||||
			isa = PBXContainerItemProxy;
 | 
			
		||||
			containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */;
 | 
			
		||||
			proxyType = 1;
 | 
			
		||||
			remoteGlobalIDString = 6B3E79E519D48B7F006071F7;
 | 
			
		||||
			remoteInfo = "Starscream iOS";
 | 
			
		||||
			remoteGlobalIDString = 33CCF0841F5DDC030099B092;
 | 
			
		||||
			remoteInfo = StarscreamSocketIO;
 | 
			
		||||
		};
 | 
			
		||||
		74638B631F111CD000F5E1FF /* PBXContainerItemProxy */ = {
 | 
			
		||||
			isa = PBXContainerItemProxy;
 | 
			
		||||
			containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */;
 | 
			
		||||
			proxyType = 2;
 | 
			
		||||
			remoteGlobalIDString = 6B3E79E619D48B7F006071F7;
 | 
			
		||||
			remoteInfo = "Starscream iOS";
 | 
			
		||||
		};
 | 
			
		||||
		74638B651F111CD000F5E1FF /* PBXContainerItemProxy */ = {
 | 
			
		||||
			isa = PBXContainerItemProxy;
 | 
			
		||||
			containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */;
 | 
			
		||||
			proxyType = 2;
 | 
			
		||||
			remoteGlobalIDString = 6B3E79F119D48B7F006071F7;
 | 
			
		||||
			remoteInfo = "Starscream iOSTests";
 | 
			
		||||
		};
 | 
			
		||||
		74638B671F111CD000F5E1FF /* PBXContainerItemProxy */ = {
 | 
			
		||||
			isa = PBXContainerItemProxy;
 | 
			
		||||
			containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */;
 | 
			
		||||
			proxyType = 2;
 | 
			
		||||
			remoteGlobalIDString = D9C3E35F19E48FF1009FC285;
 | 
			
		||||
			remoteInfo = "Starscream OSX";
 | 
			
		||||
		};
 | 
			
		||||
		74638B691F111CD000F5E1FF /* PBXContainerItemProxy */ = {
 | 
			
		||||
			isa = PBXContainerItemProxy;
 | 
			
		||||
			containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */;
 | 
			
		||||
			proxyType = 2;
 | 
			
		||||
			remoteGlobalIDString = D9C3E36919E48FF1009FC285;
 | 
			
		||||
			remoteInfo = "Starscream OSXTests";
 | 
			
		||||
		};
 | 
			
		||||
		74638B6B1F111CD000F5E1FF /* PBXContainerItemProxy */ = {
 | 
			
		||||
			isa = PBXContainerItemProxy;
 | 
			
		||||
			containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */;
 | 
			
		||||
			proxyType = 2;
 | 
			
		||||
			remoteGlobalIDString = 091277971BD673A70003036D;
 | 
			
		||||
			remoteInfo = "Starscream tvOS";
 | 
			
		||||
		};
 | 
			
		||||
		74638B6D1F111CD000F5E1FF /* PBXContainerItemProxy */ = {
 | 
			
		||||
			isa = PBXContainerItemProxy;
 | 
			
		||||
			containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */;
 | 
			
		||||
			proxyType = 2;
 | 
			
		||||
			remoteGlobalIDString = 091277A01BD673A70003036D;
 | 
			
		||||
			remoteInfo = "Starscream tvOSTests";
 | 
			
		||||
		};
 | 
			
		||||
		74638B711F111CF100F5E1FF /* PBXContainerItemProxy */ = {
 | 
			
		||||
		74B3C8431F7F3F98007D96C8 /* PBXContainerItemProxy */ = {
 | 
			
		||||
			isa = PBXContainerItemProxy;
 | 
			
		||||
			containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */;
 | 
			
		||||
			proxyType = 1;
 | 
			
		||||
			remoteGlobalIDString = D9C3E35E19E48FF1009FC285;
 | 
			
		||||
			remoteInfo = "Starscream OSX";
 | 
			
		||||
			remoteGlobalIDString = 33CCF0841F5DDC030099B092;
 | 
			
		||||
			remoteInfo = StarscreamSocketIO;
 | 
			
		||||
		};
 | 
			
		||||
		74638B731F111CF600F5E1FF /* PBXContainerItemProxy */ = {
 | 
			
		||||
		74B3C8451F7F3F9C007D96C8 /* PBXContainerItemProxy */ = {
 | 
			
		||||
			isa = PBXContainerItemProxy;
 | 
			
		||||
			containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */;
 | 
			
		||||
			proxyType = 1;
 | 
			
		||||
			remoteGlobalIDString = 091277961BD673A70003036D;
 | 
			
		||||
			remoteInfo = "Starscream tvOS";
 | 
			
		||||
			remoteGlobalIDString = 33CCF0841F5DDC030099B092;
 | 
			
		||||
			remoteInfo = StarscreamSocketIO;
 | 
			
		||||
		};
 | 
			
		||||
/* End PBXContainerItemProxy section */
 | 
			
		||||
 | 
			
		||||
@ -436,12 +408,8 @@
 | 
			
		||||
		74638B5B1F111CD000F5E1FF /* Products */ = {
 | 
			
		||||
			isa = PBXGroup;
 | 
			
		||||
			children = (
 | 
			
		||||
				74638B641F111CD000F5E1FF /* StarscreamSocketIO.framework */,
 | 
			
		||||
				74638B661F111CD000F5E1FF /* Starscream iOSTests.xctest */,
 | 
			
		||||
				74638B681F111CD000F5E1FF /* StarscreamSocketIO.framework */,
 | 
			
		||||
				74638B6A1F111CD000F5E1FF /* Starscream OSXTests.xctest */,
 | 
			
		||||
				74638B6C1F111CD000F5E1FF /* StarscreamSocketIO.framework */,
 | 
			
		||||
				74638B6E1F111CD000F5E1FF /* Starscream tvOSTests.xctest */,
 | 
			
		||||
				74B3C83A1F7F3ECE007D96C8 /* StarscreamSocketIO.framework */,
 | 
			
		||||
				74B3C83C1F7F3ECE007D96C8 /* Starscream Tests.xctest */,
 | 
			
		||||
			);
 | 
			
		||||
			name = Products;
 | 
			
		||||
			sourceTree = "<group>";
 | 
			
		||||
@ -550,7 +518,7 @@
 | 
			
		||||
			buildRules = (
 | 
			
		||||
			);
 | 
			
		||||
			dependencies = (
 | 
			
		||||
				745225ED1F1BA89E007EA874 /* PBXTargetDependency */,
 | 
			
		||||
				74B3C8461F7F3F9C007D96C8 /* PBXTargetDependency */,
 | 
			
		||||
			);
 | 
			
		||||
			name = "SocketIO-iOS";
 | 
			
		||||
			productName = "SocketIO-iOS";
 | 
			
		||||
@ -587,7 +555,7 @@
 | 
			
		||||
			buildRules = (
 | 
			
		||||
			);
 | 
			
		||||
			dependencies = (
 | 
			
		||||
				74638B721F111CF100F5E1FF /* PBXTargetDependency */,
 | 
			
		||||
				74B3C8441F7F3F98007D96C8 /* PBXTargetDependency */,
 | 
			
		||||
			);
 | 
			
		||||
			name = "SocketIO-Mac";
 | 
			
		||||
			productName = "SocketIO-Mac";
 | 
			
		||||
@ -624,7 +592,7 @@
 | 
			
		||||
			buildRules = (
 | 
			
		||||
			);
 | 
			
		||||
			dependencies = (
 | 
			
		||||
				74638B741F111CF600F5E1FF /* PBXTargetDependency */,
 | 
			
		||||
				74B3C8421F7F3F93007D96C8 /* PBXTargetDependency */,
 | 
			
		||||
			);
 | 
			
		||||
			name = "SocketIO-tvOS";
 | 
			
		||||
			productName = "SocketIO-iOS";
 | 
			
		||||
@ -704,46 +672,18 @@
 | 
			
		||||
/* End PBXProject section */
 | 
			
		||||
 | 
			
		||||
/* Begin PBXReferenceProxy section */
 | 
			
		||||
		74638B641F111CD000F5E1FF /* StarscreamSocketIO.framework */ = {
 | 
			
		||||
		74B3C83A1F7F3ECE007D96C8 /* StarscreamSocketIO.framework */ = {
 | 
			
		||||
			isa = PBXReferenceProxy;
 | 
			
		||||
			fileType = wrapper.framework;
 | 
			
		||||
			path = StarscreamSocketIO.framework;
 | 
			
		||||
			remoteRef = 74638B631F111CD000F5E1FF /* PBXContainerItemProxy */;
 | 
			
		||||
			remoteRef = 74B3C8391F7F3ECE007D96C8 /* PBXContainerItemProxy */;
 | 
			
		||||
			sourceTree = BUILT_PRODUCTS_DIR;
 | 
			
		||||
		};
 | 
			
		||||
		74638B661F111CD000F5E1FF /* Starscream iOSTests.xctest */ = {
 | 
			
		||||
		74B3C83C1F7F3ECE007D96C8 /* Starscream Tests.xctest */ = {
 | 
			
		||||
			isa = PBXReferenceProxy;
 | 
			
		||||
			fileType = wrapper.cfbundle;
 | 
			
		||||
			path = "Starscream iOSTests.xctest";
 | 
			
		||||
			remoteRef = 74638B651F111CD000F5E1FF /* PBXContainerItemProxy */;
 | 
			
		||||
			sourceTree = BUILT_PRODUCTS_DIR;
 | 
			
		||||
		};
 | 
			
		||||
		74638B681F111CD000F5E1FF /* StarscreamSocketIO.framework */ = {
 | 
			
		||||
			isa = PBXReferenceProxy;
 | 
			
		||||
			fileType = wrapper.framework;
 | 
			
		||||
			path = StarscreamSocketIO.framework;
 | 
			
		||||
			remoteRef = 74638B671F111CD000F5E1FF /* PBXContainerItemProxy */;
 | 
			
		||||
			sourceTree = BUILT_PRODUCTS_DIR;
 | 
			
		||||
		};
 | 
			
		||||
		74638B6A1F111CD000F5E1FF /* Starscream OSXTests.xctest */ = {
 | 
			
		||||
			isa = PBXReferenceProxy;
 | 
			
		||||
			fileType = wrapper.cfbundle;
 | 
			
		||||
			path = "Starscream OSXTests.xctest";
 | 
			
		||||
			remoteRef = 74638B691F111CD000F5E1FF /* PBXContainerItemProxy */;
 | 
			
		||||
			sourceTree = BUILT_PRODUCTS_DIR;
 | 
			
		||||
		};
 | 
			
		||||
		74638B6C1F111CD000F5E1FF /* StarscreamSocketIO.framework */ = {
 | 
			
		||||
			isa = PBXReferenceProxy;
 | 
			
		||||
			fileType = wrapper.framework;
 | 
			
		||||
			path = StarscreamSocketIO.framework;
 | 
			
		||||
			remoteRef = 74638B6B1F111CD000F5E1FF /* PBXContainerItemProxy */;
 | 
			
		||||
			sourceTree = BUILT_PRODUCTS_DIR;
 | 
			
		||||
		};
 | 
			
		||||
		74638B6E1F111CD000F5E1FF /* Starscream tvOSTests.xctest */ = {
 | 
			
		||||
			isa = PBXReferenceProxy;
 | 
			
		||||
			fileType = wrapper.cfbundle;
 | 
			
		||||
			path = "Starscream tvOSTests.xctest";
 | 
			
		||||
			remoteRef = 74638B6D1F111CD000F5E1FF /* PBXContainerItemProxy */;
 | 
			
		||||
			path = "Starscream Tests.xctest";
 | 
			
		||||
			remoteRef = 74B3C83B1F7F3ECE007D96C8 /* PBXContainerItemProxy */;
 | 
			
		||||
			sourceTree = BUILT_PRODUCTS_DIR;
 | 
			
		||||
		};
 | 
			
		||||
/* End PBXReferenceProxy section */
 | 
			
		||||
@ -936,20 +876,20 @@
 | 
			
		||||
			target = 576349FA1BD9B46A00E19CD7 /* SocketIO-tvOS */;
 | 
			
		||||
			targetProxy = 57634A3D1BD9B4B800E19CD7 /* PBXContainerItemProxy */;
 | 
			
		||||
		};
 | 
			
		||||
		745225ED1F1BA89E007EA874 /* PBXTargetDependency */ = {
 | 
			
		||||
		74B3C8421F7F3F93007D96C8 /* PBXTargetDependency */ = {
 | 
			
		||||
			isa = PBXTargetDependency;
 | 
			
		||||
			name = "Starscream iOS";
 | 
			
		||||
			targetProxy = 745225EC1F1BA89E007EA874 /* PBXContainerItemProxy */;
 | 
			
		||||
			name = StarscreamSocketIO;
 | 
			
		||||
			targetProxy = 74B3C8411F7F3F93007D96C8 /* PBXContainerItemProxy */;
 | 
			
		||||
		};
 | 
			
		||||
		74638B721F111CF100F5E1FF /* PBXTargetDependency */ = {
 | 
			
		||||
		74B3C8441F7F3F98007D96C8 /* PBXTargetDependency */ = {
 | 
			
		||||
			isa = PBXTargetDependency;
 | 
			
		||||
			name = "Starscream OSX";
 | 
			
		||||
			targetProxy = 74638B711F111CF100F5E1FF /* PBXContainerItemProxy */;
 | 
			
		||||
			name = StarscreamSocketIO;
 | 
			
		||||
			targetProxy = 74B3C8431F7F3F98007D96C8 /* PBXContainerItemProxy */;
 | 
			
		||||
		};
 | 
			
		||||
		74638B741F111CF600F5E1FF /* PBXTargetDependency */ = {
 | 
			
		||||
		74B3C8461F7F3F9C007D96C8 /* PBXTargetDependency */ = {
 | 
			
		||||
			isa = PBXTargetDependency;
 | 
			
		||||
			name = "Starscream tvOS";
 | 
			
		||||
			targetProxy = 74638B731F111CF600F5E1FF /* PBXContainerItemProxy */;
 | 
			
		||||
			name = StarscreamSocketIO;
 | 
			
		||||
			targetProxy = 74B3C8451F7F3F9C007D96C8 /* PBXContainerItemProxy */;
 | 
			
		||||
		};
 | 
			
		||||
/* End PBXTargetDependency section */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -310,21 +310,22 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
 | 
			
		||||
 | 
			
		||||
    private func createWebSocketAndConnect() {
 | 
			
		||||
        ws?.delegate = nil // TODO this seems a bit defensive, is this really needed?
 | 
			
		||||
        ws = WebSocket(url: urlWebSocketWithSid)
 | 
			
		||||
        var request = URLRequest(url: urlWebSocketWithSid)
 | 
			
		||||
 | 
			
		||||
        if cookies != nil {
 | 
			
		||||
            let headers = HTTPCookie.requestHeaderFields(with: cookies!)
 | 
			
		||||
            for (key, value) in headers {
 | 
			
		||||
                ws?.headers[key] = value
 | 
			
		||||
                request.setValue(value, forHTTPHeaderField: key)
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if extraHeaders != nil {
 | 
			
		||||
            for (headerName, value) in extraHeaders! {
 | 
			
		||||
                ws?.headers[headerName] = value
 | 
			
		||||
                request.setValue(value, forHTTPHeaderField: headerName)
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ws = WebSocket(request: request)
 | 
			
		||||
        ws?.callbackQueue = engineQueue
 | 
			
		||||
        ws?.enableCompression = compress
 | 
			
		||||
        ws?.delegate = self
 | 
			
		||||
@ -604,7 +605,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
 | 
			
		||||
    // MARK: Starscream delegate conformance
 | 
			
		||||
 | 
			
		||||
    /// Delegate method for connection.
 | 
			
		||||
    public func websocketDidConnect(socket: WebSocket) {
 | 
			
		||||
    public func websocketDidConnect(socket: WebSocketClient) {
 | 
			
		||||
        if !forceWebsockets {
 | 
			
		||||
            probing = true
 | 
			
		||||
            probeWebSocket()
 | 
			
		||||
@ -616,7 +617,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// Delegate method for disconnection.
 | 
			
		||||
    public func websocketDidDisconnect(socket: WebSocket, error: NSError?) {
 | 
			
		||||
    public func websocketDidDisconnect(socket: WebSocketClient, error: Error?) {
 | 
			
		||||
        probing = false
 | 
			
		||||
 | 
			
		||||
        if closed {
 | 
			
		||||
 | 
			
		||||
@ -68,12 +68,12 @@ extension SocketEngineWebsocket {
 | 
			
		||||
    // MARK: Starscream delegate methods
 | 
			
		||||
 | 
			
		||||
    /// Delegate method for when a message is received.
 | 
			
		||||
    public func websocketDidReceiveMessage(socket: WebSocket, text: String) {
 | 
			
		||||
    public func websocketDidReceiveMessage(socket: WebSocketClient, text: String) {
 | 
			
		||||
        parseEngineMessage(text)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// Delegate method for when binary is received.
 | 
			
		||||
    public func websocketDidReceiveData(socket: WebSocket, data: Data) {
 | 
			
		||||
    public func websocketDidReceiveData(socket: WebSocketClient, data: Data) {
 | 
			
		||||
        parseEngineData(data)
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1 +1 @@
 | 
			
		||||
Subproject commit 67133384e6d6654d5abcfbb143317ec8b3275bff
 | 
			
		||||
Subproject commit f2a7f24ffbcbdcf3e1fb500dd3e08984bcb5d76b
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user