MegaBits / SIOSocket

Realtime iOS application framework (client) http://socket.io
MIT License
494 stars 80 forks source link

Socket Connection Tests Always Success #64

Open eridbardhaj opened 9 years ago

eridbardhaj commented 9 years ago
- (void)testConnectToLocalhost {
    XCTestExpectation *connectionExpectation = [self expectationWithDescription: @"should connect to localhost"];
    [SIOSocket socketWithHost: @"ws://sdfsdf" response: ^(SIOSocket *socket) {
        XCTAssertNotNil(socket, @"socket could not connect to localhost");
        [connectionExpectation fulfill];
    }];

    [self waitForExpectationsWithTimeout: 10 handler: nil];
}

For any host this Socket will say that the connection is opened. Is there any reason why? Because I want to know if I can reach a specific WebSocket server, and this was the way that I was introduced to in Tests

danipralea commented 8 years ago

This happens to me as well