Coder Social home page Coder Social logo

unitt's Issues

binary message > 16K trunated

What steps will reproduce the problem?
1. Send a binary message > 16K bytes from a version 7 websocket server (using 
Worlize node.js version 7)
2.
3.

What is the expected output? What do you see instead?
Only the first 16K of the binary message arrives in didReceiveBinaryMessage. 
I've verfied (in the debugger) that the rest of the binary message arrives, but 
it appears to be thrown away. i.e. the handleCompleFragment method in 
WebSocket07.m believes that aFragment.isFinal == YES. 

I'm continuing on down into the code, but I thought I'd give you a heads up.


What version of the product are you using? On what operating system?
Latest version, on Mac OSX-10.6.6

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 30 Jun 2011 at 8:59

WebSocketClient crash while WebSocket close

What steps will reproduce the problem?
1. I use Jetty 8.1 as WebSocket server.Make sure WebSocket server is on. Run 
WebSocketClient normally. It work OK.
2. shutdown WebSocket server.
3. WebSocketClient crash as the attachment picture showed.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
UnittWebSocketClient-1.0.0-RC2

Please provide any additional information below.
I download source code of UnittWebSocketClient and read it. I found in 
WebSocket.m:

- (void)startPingTimer {
    if (self.config.keepAlive) {
        pingTimer = [NSTimer scheduledTimerWithTimeInterval:self.config.keepAlive target:self selector:@selector(repeatPing) userInfo:nil repeats:YES];
    }
}
- (void)stopPingTimer {
    if (pingTimer) {
        [pingTimer invalidate];
        [pingTimer release];
    }
}

pingTimer should not be released. it is autorelease object. I fixed it as below:
- (void)stopPingTimer {
    if (pingTimer) {
        [pingTimer invalidate];
//        [pingTimer release];
        pingTimer = nil;
    }
}



Original issue reported on code.google.com by [email protected] on 19 Jun 2012 at 6:36

Attachments:

Possible issue in close function

trunk (WebSocket.m)
====================

If I send close from application logic the server always receives a close with 
status code invalid UTF-8; The WebSocketCloseStatusInvalidUtf8 is an error that 
should be received from the server, not send when I try to close the connection 
via [mySocket close];


- (void) close
{
    [self close:WebSocketCloseStatusNormal message:nil];
}

- (void) close:(NSUInteger) aStatusCode message:(NSString*) aMessage
{
    readystate = WebSocketReadyStateClosing;
    //any rev before 10 does not perform a UTF8 check
    if (self.config.version < WebSocketVersion10)
    {
        [self sendClose:aStatusCode message:aMessage];        
    }
    else
    {
        if (aMessage && [aMessage canBeConvertedToEncoding:NSUTF8StringEncoding])
        {
            [self sendClose:aStatusCode message:aMessage];
        }
        else
        {
            [self sendClose:WebSocketCloseStatusInvalidUtf8 message:nil];
        }
    }
    isClosing = YES;
}





CHANGE (WebSocket.m)
======================

- (void) close
{
    [self close:WebSocketCloseStatusNormal message:nil];
}

- (void) close:(NSUInteger) aStatusCode message:(NSString*) aMessage
{
    readystate = WebSocketReadyStateClosing;
    //any rev before 10 does not perform a UTF8 check
    if (self.config.version < WebSocketVersion10)
    {
        [self sendClose:aStatusCode message:aMessage];        
    }
    else
    {
        if (aMessage && [aMessage canBeConvertedToEncoding:NSUTF8StringEncoding])
        {
            [self sendClose:aStatusCode message:aMessage];
        }
        else
        {
            [self sendClose:WebSocketCloseStatusInvalidUtf8 message:nil];
        }
    }
    isClosing = YES;
}


Original issue reported on code.google.com by [email protected] on 12 Oct 2011 at 8:25

WebSocket10 reports Sec-WebSocket-Version 10, but actually should be 8

According to the Hybi spec for version 10, the handshake should report version 
8 instead (oddly enough).

from 
http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#section-5.1

   9.   The request MUST include a header with the name "Sec-WebSocket-
        Version".  The value of this header MUST be 8. _Note: Although a
        draft -09 was published, as -09 was comprised of editorial
        changes and not changes to the wire protocol, 9 was not used as
        a valid value for Sec-WebSocket-Version.  This value was
        reserved in the IANA registry but was not and will not be used.
        If subsequent changes to the wire protocol are necessary, 9 will
        be skipped to prevent confusion with the draft 9 protocol._

This allows Unitt's Hybi-10 to correct connect to Tornado. It would not 
otherwise.

Original issue reported on code.google.com by [email protected] on 13 Jan 2012 at 11:44

Memory Leak on PrefixUrlHandler

The handleUrl method is supposed to return an instance of 
UIViewController<UIViewControllerHasUrl> that has a retain count of 0. An 
autorelease call needs to be applied.

Original issue reported on code.google.com by [email protected] on 22 May 2011 at 3:13

CLOSE messages are parsed but not sent to the WebSocketObserver

What steps will reproduce the problem?
1. connect to a server websocket implementation
2. get the server-side to initiate a close-handshake (The server implementation 
I'm currently using will initiate a close-handshake when the connection times 
out)
3. When the server-side sends a CLOSE message, the message is processed on the 
client-side but not sent to the WebSocketObserver.

This is because WebSocketConnection.closeSocket() is only called in 
WebSocketConnection.handleClose() when initiated by the client-side (and not 
when a close is initiated by the server-side).


What is the expected output? What do you see instead?
Expected: WebSocketObserver.onClose() to be called.
Observed: -
Observed in Logcat:
TAG       | MESSAGE
System.out| "Closing with (0): null"
System.out| "Message Bytes: ..."
System.out| "Fragment: ..."


What version of the product are you using? On what operating system?
 - Observed with: (initially) downloaded jar version: 0.9.2.1 and then with: svn-tagged src code version: 0.9.2
 - developing for Android API 1.6.
 - Test Client: Android 2.3.6 (Nexus One)
 - Test Server: Jetty 7.5.3 server
 - Websocket protocols: -07 / -08.


Please provide any additional information below.
I believe changing the WebSocketConnection.java code
FROM:
    protected void sendMessage( WebSocketFragment aFragment )
    {
        if ( !isClosing() || aFragment.getOpCode() == MessageOpCode.CLOSE )
        {
            try
            {
                getNetwork().write( aFragment.getFragment() );
            }
            catch ( IOException e )
            {
                sendErrorToObserver( e );
            }
        }
    }


TO:
    protected void sendMessage( WebSocketFragment aFragment )
    {
        if ( !isClosing() )
        {
            try
            {
                getNetwork().write( aFragment.getFragment() );
            }
            catch ( IOException e )
            {
                sendErrorToObserver( e );
            }
        } 
        else if ( aFragment.getOpCode() == MessageOpCode.CLOSE )
        {
            try
            {
                getNetwork().write( aFragment.getFragment() );
            }
            catch ( IOException e )
            {
                sendErrorToObserver( e );
            }
            closeSocket();
        }
    }

should solve the issue.

Thanks.

Original issue reported on code.google.com by [email protected] on 1 Nov 2011 at 6:24

Names of tag library Eclipse projects conflict

The names of the Eclipse projects for applications is the same as for the tag 
libraries that they use. This means that Eclipse import projects cannot be used 
from the top level directory. See the attached image.

Suggestion: rename the Eclipse projects for tag libraries to include the word 
'tags' followed by the tag version, e.g.:

authorization-tags-1.0.1
foundation-tags-1.0.0

Original issue reported on code.google.com by mslinn on 2 Oct 2011 at 2:53

Attachments:

Fragment end sent with additional messages causes loss of messages

What steps will reproduce the problem?
1. Receive a message fragment
2. Receive a buffer containing the end of the fragment, and one or more 
additional messages
3. Entire incoming buffer is appended to the fragment's byte array
4. Bytes beyond what are needed to complete the fragment are ignored

What is the expected output? What do you see instead?
Expect to not lose messages.  Instead messages are lost.

What version of the product are you using? On what operating system?
HEAD on CentOS

Please provide any additional information below.
WebSocketConnection.handleMessageData only checks to see if aData.length is 
longer than the last message.  In the scenario above the extra bytes have 
already been added to the previous fragment.


Original issue reported on code.google.com by [email protected] on 15 Nov 2011 at 5:05

Problem parsing data packages from multiple socket reads

What steps will reproduce the problem?
1. receiving data from socket in multiple reads

What is the expected output? What do you see instead?
multiple valid fragments


What version of the product are you using? On what operating system?
0.9.3.1

Please provide any additional information below.

I have difficulties with the unitt library when receiving on valid web-socket 
data package in multiple reads. I will try to give you the best possible 
explanation by going step by step through the functions involved

First read
=========

- read 1400 bytes from socket
- handle message data gets called
- a new WebSocketFragment will be created
- parsing the header -- payload size of 1480 is required
- the new fragment is not valid, as there is 0.7 web-socket packages in the 
current read (not a full package)
- fragment is not valid, so function will go to else if (fragment)
- data will be appended to fragment
- fragment is still not valid, as the payload size is higher than the fragments 
actual size
- dead end 

Second read
=========
- the fragment object from first read is in the pendingFragment queue
- the socket again returns 1200 bytes
- handleMessageData is called with the new data 
- the fragment from Read1 is enqueued
- it is not valid so we go to else if (fragment)
- the new data is appended 
- required payload size for a package is still 1480
- but now: [fragment.fragment length] returns 2600
- fragment.isValid will always return false
- dead end for me





This is the involved function; In some (described) situations 
handleCompleteFragment:fragment and handleMessageData is never called.


- (void) handleMessageData:(NSData*) aData
{
    //grab last fragment, use if not complete
    WebSocketFragment* fragment = [pendingFragments lastObject];
    if (!fragment || fragment.isValid)
    {
        //assign web socket fragment since the last one was complete
        fragment = [WebSocketFragment fragmentWithData:aData];
        [pendingFragments enqueue:fragment];
    }
    else if (fragment)
    {
        [fragment.fragment appendData:aData];
        if (fragment.isValid) 
        {
            [fragment parseContent];
        }
    }


    //if we have a complete fragment, handle it
    if (fragment.isValid) 
    {
        //handle complete fragment
        [self handleCompleteFragment:fragment];

        //if we have extra data, handle it
        if ([aData length] > fragment.messageLength)
        {
            [self handleMessageData:[aData subdataWithRange:NSMakeRange(fragment.messageLength, [aData length] - fragment.messageLength)]];
        }
    }
}







I hope you can reproduce this; I think it's a serious problem.

Cheers,
André





Original issue reported on code.google.com by [email protected] on 26 Sep 2011 at 3:34

16 bit payload sizes over 32768 become negative due to cast to short

What steps will reproduce the problem?
1. send a fragment size over 32768 bytes
2. first 7 payload bits -> size of 126, triggering 16 bit size.  spec calls for 
this to be a 16 bit uint.
3. 16 bit size is passed through WebSocketUtil.convertBytesToShort(buffer, 
index); creating negative size
4. ???
5. Profit

What is the expected output? What do you see instead?
Size should always be a unsigned integer.  instead a negative size is 
calculated (for example, -12668 instead of the expected 52856), and the read 
thread (silently) dies since there is no trapping/reporting of 
RuntimeExceptions like 

java.lang.NegativeArraySizeException
    at com.unitt.framework.websocket.WebSocketUtil.copySubArray(WebSocketUtil.java:39)
    at com.unitt.framework.websocket.WebSocketFragment.parseContent(WebSocketFragment.java:356)
    at com.unitt.framework.websocket.WebSocketFragment.<init>(WebSocketFragment.java:80)
    at com.unitt.framework.websocket.WebSocketConnection.handleMessageData(WebSocketConnection.java:540)
    at com.unitt.framework.websocket.WebSocketConnection.onReceivedData(WebSocketConnection.java:186)
    at com.unitt.framework.websocket.WebSocketClientConnection.onReceivedData(WebSocketClientConnection.java:46)
    at com.unitt.framework.websocket.simple.NetworkSocket.run(NetworkSocket.java:296)
    at java.lang.Thread.run(Thread.java:636)



What version of the product are you using? On what operating system?
HEAD on CentOS 6.0 (final)

Please provide any additional information below.
Fixing this locally Monday morning, will attach patch then.  also probably will 
include some other minor fixes I've added.

Original issue reported on code.google.com by [email protected] on 11 Nov 2011 at 8:25

websocket closes after doReadTimeout

What steps will reproduce the problem?
1. open the connection 
2. do nothing
3. socket closes

What is the expected output? What do you see instead?
keep the connection open.

What version of the product are you using? On what operating system?
used source files(*.m) in the svn trunk. 
operating system: iOS

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 20 Jul 2012 at 5:23

Draft Hixie 76 Protocol Support

What steps will reproduce the problem?
1. I already deploy this php server http://code.google.com/p/phpws/
2. The client for the above server is phpws.jmango.net:8080/test.php
3. You can connect to the server using phpws.jmango.net:12345/echo/

What is the expected output? What do you see instead?
The echo server is gonna send back everything you send to it

Kind regards


Original issue reported on code.google.com by [email protected] on 27 Sep 2011 at 3:02

Connection times out after being connected for a while

What steps will reproduce the problem?
1. I'm connecting to the server with handshake turned off and using websockets 
implementation 00
2.
3.

What is the expected output? What do you see instead?
I'm expecting to have the connection up until explicitly closed. Connection 
times out after being connected for some short period of time (20-30 seconds).

What version of the product are you using? On what operating system?
Latest version available (0.9.3.1). iOS. 

Please provide any additional information below.
Please check issue 13 for reference.

I'm I supposed to ping the connection every x seconds to keep it alive ?

Original issue reported on code.google.com by [email protected] on 21 Sep 2011 at 1:51

WebSocketDelegate pass websocket

The WebSocketDelegate protocol should pass the websocket object that is calling 
into each function call. This would allow a single object to be the delegate of 
several websockets at once.

Original issue reported on code.google.com by [email protected] on 6 Jan 2012 at 6:09

reconnect

It would be nice if there was a reconnect mechanism built into the WebSocket 
client.  I.e. something to specify the client should try every n seconds to 
reconnect after a connection attempt fails.

I wrote a timer into my project that checks to see if the socket has been 
disconnected and attempts to reconnect, but I am having issues with memory 
leaks and exc_bad_access.

Original issue reported on code.google.com by [email protected] on 15 Sep 2011 at 9:05

Host header attr should include port if not default (80)

According to:
http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-12#section-9.4

In all WebSocketXX.m files:

return [NSString stringWithFormat:@"GET %@ HTTP/1.1\r\n"
                    "Upgrade: WebSocket\r\n"
                    "Connection: Upgrade\r\n"
                    "Host: %@\r\n"
                    "Sec-WebSocket-Origin: %@\r\n"
                    "Sec-WebSocket-Protocol: %@\r\n"
                    "Sec-WebSocket-Key: %@\r\n"
                    "Sec-WebSocket-Version: 7\r\n"
                    "\r\n",
                    aRequestPath,  self.url.host, self.origin, protocolFragment, wsSecKey];

self.url.host should be replaced with something like the buildOrigin method:
(following code not tested, just to illustrate)

- (NSString*) buildHost
{
    if (self.url.port && [self.url.port intValue] == 80 || [self.url.port intValue] == 443)
        return self.url.host;

    return [NSString stringWithFormat:@"%@:%@", self.url.host, self.url.port];
}


Original issue reported on code.google.com by [email protected] on 30 Aug 2011 at 7:19

Unitt does not run on Android < 2.3

What steps will reproduce the problem?
1. Create a simple Android app using unitt to connect to a WS server
2. Run it on Android 1.0 - 2.2.x


What is the expected output?
It should work, but it fails with ClassNotFoundException for 
java.util.ArrayDeque

That class was not added to Android until API Level 9 (Android 2.3)

This can be fixed by replacing the ArrayDeque class with a Buffer from Apache 
commons-collections though it does add an additional library dependency 
(commons-collections, 3.2.1) to unitt.  Also, the commons-collections classes 
don't use generics so the result does require some explicit casts, but the 
changes are pretty minimal.  

Attached is a patch for WebSocketConnection that seems to work (tests pass, 
haven't run into any issues yet).


Original issue reported on code.google.com by [email protected] on 28 Oct 2011 at 12:43

Attachments:

UnittWebSocketClient send & receive

Use sendText and sendBinary.
I get this error when I try to send message.

-----
2011-06-26 03:10:28.351 testApp[14510:207] -[WebSocket sendText:]: unrecognized 
selector sent to instance 0x4e296f0
2011-06-26 03:10:28.354 testApp[14510:207] *** Terminating app due to uncaught 
exception 'NSInvalidArgumentException', reason: '-[WebSocket sendText:]: 
unrecognized selector sent to instance 0x4e296f0'
-----

And more Don't work didReceiveTextMessage, didReceiveBinaryMessage too.

but change is...
-(void) didReceiveMessage:(NSString *) aMessage

receved ok.

Original issue reported on code.google.com by [email protected] on 25 Jun 2011 at 6:28

Implement 07 framing

Websocket is not using 07 framing. Needs to implement the following:
 1. ping/pong
 2. binary frames
 3. continuation frames
 4. close frames


Original issue reported on code.google.com by [email protected] on 12 Jun 2011 at 3:16

EXC_BAD_ACCESS on pingTimer object

What steps will reproduce the problem?
1. connect 
2. wait for the connection to be closed
3. stopPingTimer will be called
4. [pingTimer release] will crash the program (because it wasn't retained in 
the first place)

What is the expected output? What do you see instead?
expected [pingTimer release] not to crash

What version of the product are you using? On what operating system?
I used 1.0.0-rc2 (with *.a library files) and had the same problem.
And used source files(*.m) in the svn trunk. 
operating system: iOS

Please provide any additional information below.
For discussion of proper timer release,
http://stackoverflow.com/questions/1171393/what-is-the-first-step-in-nstimer-rel
ease-and-invalidate

Original issue reported on code.google.com by [email protected] on 15 Jun 2012 at 6:01

mvn verify fails for unitt-websocket

Running mvn verify from unitt-websocket/trunk gives the following. Setup is 
Windows XP, JDK 7.

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.unitt.framework.websocket.AbstractNetworkSocketTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.203 sec <<< 
FAILURE!
Running com.unitt.framework.websocket.netty.ClientNetworkSocketTest
Sep 28, 2011 7:31:55 AM org.jboss.netty.channel.SimpleChannelUpstreamHandler
WARNING: EXCEPTION, please implement 
com.unitt.framework.websocket.netty.NettyClientNetworkSocket.exceptionCaught() 
for proper handling.
java.net.ConnectException: connection timed out
        at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processConnectTimeout(NioClientSocketPipelineSink.java:371)
        at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:283)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 31.984 sec
Running com.unitt.framework.websocket.simple.NetworkSocketTest
07:32:36,140 ERROR NetworkSocket:210 - Could not connect.
java.net.ConnectException: Connection timed out: connect
        at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at java.net.Socket.<init>(Socket.java:425)
        at java.net.Socket.<init>(Socket.java:208)
        at com.unitt.framework.websocket.simple.NetworkSocket.createSocket(NetworkSocket.java:181)
        at com.unitt.framework.websocket.simple.NetworkSocket.connect(NetworkSocket.java:199)
        at com.unitt.framework.websocket.WebSocketConnection.open(WebSocketConnection.java:204)
        at com.unitt.framework.websocket.AbstractNetworkSocketTest.testRoundTrip(AbstractNetworkSocketTest.java:43)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
        at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
        at $Proxy0.invoke(Unknown Source)
        at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
        at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 21.453 sec <<< 
FAILURE!
Running com.unitt.framework.websocket.WebSocketTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.156 sec
Running com.unitt.framework.websocket.WebSocketUtilTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec

Results :

Tests in error:
  testRoundTrip(com.unitt.framework.websocket.AbstractNetworkSocketTest)
  testRoundTrip(com.unitt.framework.websocket.simple.NetworkSocketTest)

Tests run: 10, Failures: 0, Errors: 2, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:16.578s
[INFO] Finished at: Wed Sep 28 07:32:36 PDT 2011
[INFO] Final Memory: 10M/494M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:2.7.2:test (default-test) on 
project websocket: There are test failures.
[ERROR]
[ERROR] Please refer to 
C:\work\experiments\webSocket\unitt\unitt-websocket\trunk\target\surefire-report
s for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Original issue reported on code.google.com by mslinn on 28 Sep 2011 at 2:35

Can't connect to ws://echo.websocket.org

What steps will reproduce the problem?
I'm initializing the web socket this way:

mainURL = @"ws://echo.websocket.org";

ws = [[WebSocket10 webSocketWithURLString:mainURL delegate:self origin:nil 
protocols:nil tlsSettings:nil verifyHandshake:YES] retain];

Then I'm calling startMyWebSocket which calls open on the web socket (ws). 
Right after calling open I get a didReceiveError with a nil NSERROR*.


What is the expected output? What do you see instead?
I'm expecting to have the didOpen callback fired, instead the didReceiveError 
is called with a nil NSERROR*.


What version of the product are you using? On what operating system?
I'm writing an app for ipad 4.3 and i'm testing it with the ipad 4.3 simulator.


Please provide any additional information below.

I've tried all different web sockets implementations that come with the 
library, 00, 07, 08 and 10 and all have the same results.

I've tried connecting to a different websocket server and I managed to get the 
didOpen callback called but I never managed to receive any messages at all.

Original issue reported on code.google.com by [email protected] on 11 Sep 2011 at 3:17

Receive large data from server

Hey, I been using the unittwebsocket to send and receive data from a tornado 
webserver all working good except on large data size.

the server & unittwebsocket are set to work with the rfc6455

I changed the payload in unittwebsocket to 5 * 1024 * 1024 (5MB) and been able 
to send to the server large binary data.

the server sends the data back as it should but the unittwebsocket does not 
parse the header correctly and my app is crashing.
I also tried to encode the same data with base64 and send it as string but 
still the problem is the same.

for some reason the tornado server does not even tries to split the data into 
fragments it always send it as one fragment (if anyone familiar with tornado 
server as well maybe can elaborate on that issue) maybe splitting the data from 
the server side will solve the problem for me on the unittwebsockt side


What steps will reproduce the problem?
1. try to receive large data from websocket server

What version of the product are you using? On what operating system?
0.9.3

Please provide any additional information below.

Attached is the relevant exception log.

Thank you.

Original issue reported on code.google.com by [email protected] on 16 May 2012 at 10:00

Attachments:

WSS tlssettings

what are the steps required to establish a websocket connection using 
wss(secure).

I have used the following snippet of code

    NSMutableDictionary *tlsSettings = [NSMutableDictionary dictionaryWithCapacity:4];
    [tlsSettings setObject:url.host forKey:(NSString *)kCFStreamSSLPeerName];

   [tlsSettings setObject:[NSNumber numberWithBool:YES]
                    forKey:(NSString *)kCFStreamSSLAllowsExpiredCertificates];

     [tlsSettings setObject:[NSNumber numberWithBool:YES]
                    forKey:(NSString *)kCFStreamSSLAllowsAnyRoot];

    [tlsSettings setObject:[NSNumber numberWithBool:NO]
                    forKey:(NSString *)kCFStreamSSLValidatesCertificateChain];

    WebSocketConnectConfig *config = [WebSocketConnectConfig configWithURLString:aURl origin:origin protocols:[NSArray  arrayWithObject:wsSubprotocol] tlsSettings:tlsSettings headers:nil verifySecurityKey:YES extensions:nil];


WHen I use this from the simulator or the device I get the following error 
message


Error: errorDesc=The operation couldn’t be completed. 
(kCFStreamErrorDomainSSL error -9807.), failureReason=(null)

Any thoughts on how to configure a secure websocket would be great.

Cheers.

Original issue reported on code.google.com by [email protected] on 26 Jun 2012 at 2:27

TLS delegate missing

1) I have built from Unitt sources in order to debug my secure web socket 
iphone application. I notice that WebSocket.m is missing the required 
AsyncSocket delegate ...

/**
 * Called after the socket has successfully completed SSL/TLS negotiation.
 * This method is not called unless you use the provided startTLS method.
 * 
 * If a SSL/TLS negotiation fails (invalid certificate, etc) then the socket will immediately close,
 * and the onSocket:willDisconnectWithError: delegate method will be called with the specific SSL error code.
 **/
- (void)onSocketDidSecure:(AsyncSocket *)sock
{
    [self onSocket:sock didSecure:TRUE];
}

2) However, after the wss socket is properly opened with a TLS handshake, I get 
a server error on the first client data write. The client writes 202 bytes, the 
server receives 272 bytes and the method authentication code fails on the 
server. I see my client data in the server trace, but it has 8 bytes of garbage 
pre-pended.

Earlier I tried the SocketRocket library with the same results on the server - 
bad MAC after a good handshake. My android version of the Unitt client works 
great.  

I can debug as far as CFWriteStreamWrite(...) in AsyncSocket doSendBytes - 
which reports that 202 client data bytes indeed get written. But I am at a loss 
as to how to debug further. Somewhere, the iOS TLS framework is corrupting my 
client data during the send - I think. 

Original issue reported on code.google.com by [email protected] on 30 Jun 2012 at 2:58

WebSocketClient throws exception on incoming request

I'am using the (latest, Oct. 8.) v0.9.4 UnittWebSocketClient binaries. While 
opening the stream, the following exception was thrown:

2011-10-31 22:20:30.233 RemoteLogger[4446:207] -[NSConcreteMutableData 
base64EncodedString]: unrecognized selector sent to instance 0x4e48030
2011-10-31 22:20:30.236 RemoteLogger[4446:207] *** Terminating app due to 
uncaught exception 'NSInvalidArgumentException', reason: 
'-[NSConcreteMutableData base64EncodedString]: unrecognized selector sent to 
instance 0x4e48030'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x0105b5a9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x011af313 objc_exception_throw + 44
    2   CoreFoundation                      0x0105d0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    3   CoreFoundation                      0x00fcc966 ___forwarding___ + 966
    4   CoreFoundation                      0x00fcc522 _CF_forwarding_prep_0 + 50
    5   RemoteLogger                        0x0002090d -[WebSocket generateSecKeys] + 189
    6   RemoteLogger                        0x0001f5ab -[WebSocket getRequest:] + 315
    7   RemoteLogger                        0x000219f2 -[WebSocket onSocket:didConnectToHost:port:] + 674
    8   RemoteLogger                        0x00013c55 -[AsyncSocket doStreamOpen] + 405
    9   RemoteLogger                        0x0001a426 -[AsyncSocket doCFWriteStreamCallback:forStream:] + 342
    10  RemoteLogger                        0x0001a7f7 MyCFWriteStreamCallback + 199
    11  CoreFoundation                      0x0100a953 _signalEventSync + 99
    12  CoreFoundation                      0x0100b22e _cfstream_solo_signalEventSync + 126
    13  CoreFoundation                      0x0100a6c9 _CFStreamSignalEvent + 457
    14  CoreFoundation                      0x0100b1a7 CFWriteStreamSignalEvent + 39
    15  CFNetwork                           0x0019fb2f _ZN12SocketStream40dispatchSignalFromSocketCallbackUnlockedEP24SocketStreamSignalHolder + 101
    16  CFNetwork                           0x000fa41d _ZN12SocketStream14socketCallbackEP10__CFSocketmPK8__CFDataPKv + 221
    17  CFNetwork                           0x000fa321 _ZN12SocketStream22_SocketCallBack_streamEP10__CFSocketmPK8__CFDataPKvPv + 117
    18  CoreFoundation                      0x00fd533a __CFSocketDoCallback + 346
    19  CoreFoundation                      0x00fd4eca __CFSocketPerformV0 + 138
    20  CoreFoundation                      0x0103c8ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
    21  CoreFoundation                      0x00f9a79d __CFRunLoopDoSources0 + 333
    22  CoreFoundation                      0x00f99d86 __CFRunLoopRun + 470
    23  CoreFoundation                      0x00f99840 CFRunLoopRunSpecific + 208
    24  CoreFoundation                      0x00f99761 CFRunLoopRunInMode + 97
    25  GraphicsServices                    0x017611c4 GSEventRunModal + 217
    26  GraphicsServices                    0x01761289 GSEventRun + 115
    27  UIKit                               0x002bbc93 UIApplicationMain + 1160
    28  RemoteLogger                        0x00002449 main + 121
    29  RemoteLogger                        0x000023c5 start + 53

The method on the top of the stack is [WebSocket generateSecKeys]

Original issue reported on code.google.com by [email protected] on 31 Oct 2011 at 9:29

Bug: Sec-WebSocket-Key length is not 16 bytes

Hi guys,

I would like to report that the generateSecKeys() method in WebSocketHandshake 
is buggy. The length  of the generated key needs to be 16 bytes according to 
the protocol:

A "Sec-WebSocket-Key" header field with a base64-encoded (see
        Section 4 of [RFC4648]) value that, when decoded, is 16 bytes in
        length.

I am using version Java API 0.9.2.1

Cheers,
Ivan

Original issue reported on code.google.com by [email protected] on 19 Oct 2011 at 4:01

Doesn't generate any files

What steps will reproduce the problem?
Followed the Wiki instructions for making a bean and running it via maven

What is the expected output? What do you see instead?
to generate some *Bean source or class files

What version of the product are you using? On what operating system?
tried 1.0.0, 1.0.1/1.0.2 combo and not specifying
Apache Maven 3.0-alpha-5 (r883378; 2009-11-23 07:53:41-0800)
Java version: 1.6.0_17
Java home: C:\Program Files\Java\jdk1.6.0_17\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7" version: "6.1" arch: "x86" Family: "windows"

Please provide any additional information below.
[INFO] --- buildtools:1.0.2:modeldata (default) @ irp ---
warning: Annotation types without processors: [RemoteServiceRelativePath,
java.lang.Override, ModelDataBean]
1 warning


Original issue reported on code.google.com by [email protected] on 20 Jan 2010 at 6:18

Undefined Symbols for architecture i386: _kCFStreamErrorDomain Mach ...

What steps will reproduce the problem?

Doing what is shown in
http://code.google.com/p/unitt/wiki/UnittWebSocketClient

What is the expected output? What do you see instead?

Undefined symbols for architecture i386:
  "_kCFStreamErrorDomainMach", referenced from:
      -[AsyncSocket errorFromCFStreamError:] in libUnittWebSocketClient.a(AsyncSocket.o)
  "_kCFStreamErrorDomainNetDB", referenced from:
      -[AsyncSocket errorFromCFStreamError:] in libUnittWebSocketClient.a(AsyncSocket.o)
  "_kCFStreamErrorDomainNetServices", referenced from:
      -[AsyncSocket errorFromCFStreamError:] in libUnittWebSocketClient.a(AsyncSocket.o)
  "_kCFStreamErrorDomainSystemConfiguration", referenced from:
      -[AsyncSocket errorFromCFStreamError:] in libUnittWebSocketClient.a(AsyncSocket.o)
  "_kCFStreamPropertySSLSettings", referenced from:
      -[AsyncSocket maybeStartTLS] in libUnittWebSocketClient.a(AsyncSocket.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)


What version of the product are you using? On what operating system?
UnittWebSocketClient 0.9.4
XCode 4.2
Mac OS 10.6.8
iPhone 5.0 Simulator

Please provide any additional information below.
At the beginning XCode didn't find the WebSocket class, after fuddling around 
with the search paths I now got the error above.

Original issue reported on code.google.com by [email protected] on 13 Dec 2011 at 1:25

Android WebView

Ship basic android WebView wrapper using addJavascriptInterface() like this 
draft -75 version: https://github.com/anismiles/websocket-android-phonegap


Original issue reported on code.google.com by [email protected] on 16 Sep 2011 at 9:35

simple/NetworkSocket.run() overallocates read buffer

What steps will reproduce the problem?
1. input.available() returns size over 65k (for example 70k)
2. byte array is allocated for 70k bytes
3. input.read() returns 65k bytes
4. 70k buffer (containing 65k valid bytes) is passed to observer class
5. bytes past 65k are null

What is the expected output? What do you see instead?
byte buffer should be allocated after read to exact size

What version of the product are you using? On what operating system?
HEAD on CentOS 6.0

Please provide any additional information below.
can switch to a local permanent buffer; allocate new buffer after read and use 
System.arraycopy to move the bytes.

byte[] bytesIn = new byte[read];
System.arraycopy(readBuffer, 0, bytesIn, 0, read);


Original issue reported on code.google.com by [email protected] on 14 Nov 2011 at 6:23

When a header comes at the end of a fragment, subsequent fragments are not assembled correctly

When receiving many messages I have seen cases where the message header would 
appear at the end of a fragment.  When this happens, the next time 
handleMessageData: gets called, it appends the new data to the fragment without 
taking into consideration the current fragment length.  This causes the header 
to be truncated from the message when it recursively calls handleMessageData 
with subset of the data fragment.

I've made this work by calculating a message offset that gets factored in when 
computing the subdata range.

Original issue reported on code.google.com by art.jacobson on 29 Feb 2012 at 8:59

Attachments:

Null Bytes on the end of message

What steps will reproduce the problem?
1. send utf-8 message to a websocket server (Tornado)
2. print the income message with %r to the console, you then can see that for 
each char that is sent a null byte(0x00) is being added

What is the expected output? What do you see instead?
The expected output is without the null bytes


What version of the product are you using? On what operating system?
0.9.3

Please provide any additional information below.
I have implamented a solution for this issue, but I'm sure that it can be 
improved,
on the WebSocketConnection.java file I Edited the code on line 791 as follow:
if ( throwsErrorOnInvalidUtf8() )
                {
                    CharsetEncoder encoder = utf8Charset.newEncoder();
                    ByteBuffer buffer = encoder.encode( CharBuffer.wrap( aData ) );
                    byte[] bytes = buffer.array();
                    int i;
                    for(i= 0; i < bytes.length; i++){
                        if (bytes[i] == 0)
                            break;
                    }
                    byte[] out = new byte[i+1];
                    out = Arrays.copyOfRange(bytes, 0, i);
                    return out;
                }

Original issue reported on code.google.com by [email protected] on 3 Jun 2012 at 1:57

Linker error: duplicate symbol _WebSocketException

What steps will reproduce the problem?
1. add static library to iOS project
2. configure lib search paths as suggested
3. build for iPhone Simulator

What is the expected output? What do you see instead?
ld: duplicate symbol _WebSocketException in 
/Users/bgulanowski/Dev/Nulayer/crowdstream/dependencies/UnittWebSocketClient/bin
/Debug-iphonesimulator/libUnittWebSocketClient.a(WebSocket07.o) and 
/Users/bgulanowski/Dev/Nulayer/crowdstream/dependencies/UnittWebSocketClient/bin
/Debug-iphonesimulator/libUnittWebSocketClient.a(WebSocket00.o) for 
architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang 
failed with exit code 1


What version of the product are you using? On what operating system?
version 2.1 on iOS 5.0

Please provide any additional information below.
I'd really like an explanation of how you are putting two different classes 
with the same name into the same library. Not to mention the other associated 
symbols with the same names. This doesn't seem right. How can the linker 
distinguish them? Apparently in can't, in this case.

For the short term, I'm going to build the library myself and NOT include the 
webSocket00.h/m files.

Original issue reported on code.google.com by [email protected] on 27 Jun 2011 at 9:03

Connecting to websocket over internet does not work, localhost it is possible but I can't send

What steps will reproduce the problem?

Doing what is shown in
http://code.google.com/p/unitt/wiki/UnittWebSocketClient
and then replacing the url by "ws://echo.websocket.org".

What is the expected output? What do you see instead?

2011-12-13 15:59:41.417 Tests[3618:207] WebSocketTest/testWebSocket  
2011-12-13 15:59:42.904 Tests[3618:207] Re-running: WebSocketTest/testWebSocket 
<GHTest: 0x797c0e0>
2011-12-13 15:59:42.927 Tests[3618:207] WebSocketTest/testWebSocket ✔ 0.02s
2011-12-13 15:59:43.062 Tests[3618:207] Oops. An error occurred.
2011-12-13 15:59:43.064 Tests[3618:207] Oops. It closed.

What version of the product are you using? On what operating system?
UnittWebSocketClient 0.9.4
XCode 4.2
Mac OS 10.6.8
iPhone 5.0 Simulator

Please provide any additional information below.
I followed 
http://jbraffoul.wordpress.com/2011/09/24/a-node-js-websocket-server-on-ubuntu-1
1-04/ and started a local server. Connecting to it as 
"ws://localhost:8000/test" *does* work (text "connection is open") but as soon 
as I do the following it gives me the same error:

TestWebSocket* myWS = [[TestWebSocket alloc] init];
[myWS startMyWebSocket];
 [[myWS ws]sendText:@"testString"];


Original issue reported on code.google.com by [email protected] on 13 Dec 2011 at 3:08

Urls only work with at least 3 slashes in it

What steps will reproduce the problem?

WebSocketConnectConfig* config = [WebSocketConnectConfig 
configWithURLString:@"ws://echo.websocket.org" origin:nil protocols:nil 
tlsSettings:nil headers:nil verifySecurityKey:NO extensions:nil ];

and then opening the Web Socket

What is the expected output? What do you see instead?

I expect a "Did open" which I only get when I use "ws://echo.websocket.org/" 
(with a trailing slash at then end). The same problem I have with using 
localhost.

What version of the product are you using? On what operating system?
UnittWebSocketClient 0.9.4
XCode 4.2
Mac OS 10.6.8
iPhone 5.0 Simulator

Original issue reported on code.google.com by [email protected] on 13 Dec 2011 at 4:28

Fragmented packets aren't correctly assembled

Currently fragmented packets may see doubling by having their data appended 
twice due to in WebSocket.m's handleMessageData method:

<pre>
        fragment = [WebSocketFragment fragmentWithData:aData];
...
        [fragment.fragment appendData:aData];
...
</pre>

They also don't correctly reassemble, at least for me using Tornado 2.1.1 HEAD. 
The issue being the logic surrounding creating a fragment or pulling it from 
the pendingFragments queue. This rewritten method performs correctly for me:

<pre>
- (void) handleMessageData:(NSData*) aData
{
    //grab last fragment, use if not complete
    WebSocketFragment* fragment = [pendingFragments lastObject];
    if (!fragment || fragment.isValid) {
        //assign web socket fragment since the last one was complete
        fragment = [WebSocketFragment fragmentWithData:aData];
        [pendingFragments enqueue:fragment];
    } else {
        //append the data
        [fragment.fragment appendData:aData];
        //if we have a fragment, let's see if we can parse it and continue
        NSString *dataAsStr = [[NSString alloc] initWithData:fragment.fragment encoding:NSUTF8StringEncoding];
        inspect(@"fragment as string: %@", dataAsStr);
    }
    NSAssert(fragment != nil, @"Websocket fragment should never be nil");

    //parse the data, if possible
    if (fragment.canBeParsed) 
    {
        [fragment parseContent];

        //if we have a complete fragment, handle it
        if (fragment.isValid)
        {
            [self handleCompleteFragment:fragment];
        }
    }
    //if we have extra data, handle it
    if (fragment.messageLength > 0 && ([aData length] > fragment.messageLength))
    {
        [self handleMessageData:[aData subdataWithRange:NSMakeRange(fragment.messageLength, [aData length] - fragment.messageLength)]];
    }
}
</pre>

Aaron

Original issue reported on code.google.com by [email protected] on 18 Jan 2012 at 7:14

Problem with parsing data that comes in multiple packages

What steps will reproduce the problem?
1. receiving package of data in multiple reads
2. data will be appended to one package
3. payload was not updated accordingly

What is the expected output? What do you see instead?
Expected an NSUTF8StringObject. Received an empty NSString. 

What version of the product are you using? On what operating system?
UnittWebSocketClient (trunk).

Please provide any additional information below.
Temporarily fixed the issue by refreshing the payload after appending data; 
please see file attached.

Original issue reported on code.google.com by [email protected] on 13 Jul 2011 at 2:48

Attachments:

Error on UnitWebSocket

I get this error when I try to open the socket.


NSConcreteMutableData base64EncodedString]: unrecognized selector sent to 
instance 0x5917920
2011-05-11 14:35:20.465 urbaninvaders[5338:307] *** Terminating app due to 
uncaught exception 'NSInvalidArgumentException', reason: 
'-[NSConcreteMutableData base64EncodedString]: unrecognized selector sent to 
instance 0x5917920'

Original issue reported on code.google.com by [email protected] on 11 May 2011 at 12:40

AsyncSocket over releasing error?

Reported by a user:

I discover one over-released object which caused BAD_EXE_ACCESS in this line
return [NSError errorWithDomain:AsyncSocketErrorDomain 
code:AsyncSocketConnectTimeoutError userInfo:info];
in AsynSocket.m

Later this object will be released twice.

How to reproduce this error:
Get server timeout twice

Original issue reported on code.google.com by [email protected] on 9 Oct 2011 at 2:31

WebSocket10 But in close function

What steps will reproduce the problem?
1. Implement WebSocket10 as e.g. myWebSocket
2. call [myWebSocket close]

What is the expected output? What do you see instead?
closed socket connection

What version of the product are you using? On what operating system?
0.9.3.1

Please provide any additional information below.


If I use WebSocket10.m and close on my web socket object it won't be closed; 
seems like the close function calls itself recursively if you try to send a 
close via [mySocket close];

- (void) close
{
    [self close:WebSocketCloseStatusNormal message:nil];
}

- (void) close:(NSUInteger) aStatusCode message:(NSString*) aMessage
{
    readystate = WebSocketReadyStateClosing;
    if ([aMessage canBeConvertedToEncoding:NSUTF8StringEncoding])
    {
        [self sendClose:aStatusCode message:aMessage];
    }
    else
    {
        [self close:WebSocketCloseStatusInvalidUtf8 message:nil];
    }
    isClosing = YES;
}


Instead shouldn't it look like?


- (void) close
{
    [self close:WebSocketCloseStatusNormal message:nil];
}

- (void) close:(NSUInteger) aStatusCode message:(NSString*) aMessage
{
    readystate = WebSocketReadyStateClosing;
    if ([aMessage canBeConvertedToEncoding:NSUTF8StringEncoding])
    {
        [self sendClose:aStatusCode message:aMessage];
    }
    else
    {
        [self sendClose:aStatusCode message:nil];
    }
    isClosing = YES;
}

Original issue reported on code.google.com by [email protected] on 26 Sep 2011 at 9:02

wstest websockets close immediately with Google Chrome

I made a web page for wstest and the Google Chrome browser. The WebSocket 
closes immediately after opening.

I put together an Eclipse/Maven project for testws, attached. I can see the 
servlet getting initialized, but it is never called again. I tried putting 
breakpoints on doPost() and service() but they are never called either.

I can see the JS on on the web page building a WebService object, but it seems 
to be rejected immediately. I looked at the chrome://net-internals/#events to 
see what response Chrome actually received, and the SOCKET_STREAM looks like 
this:

ws://localhost:8080/

Start Time: Sun Oct 02 2011 16:59:54 GMT-0700 (Pacific Daylight Time)

t=1317599994550 [st=0] +REQUEST_ALIVE             [dt=4]
t=1317599994550 [st=0]    +SOCKET_STREAM_CONNECT  [dt=1]
                           --> url = "ws://localhost:8080/"
t=1317599994550 [st=0]       +PROXY_SERVICE       [dt=0]
t=1317599994550 [st=0]           PROXY_SERVICE_RESOLVED_PROXY_LIST  
                                 --> pac_string = "DIRECT"
t=1317599994550 [st=0]       -PROXY_SERVICE       
t=1317599994550 [st=0]       +PROXY_SERVICE       [dt=0]
t=1317599994550 [st=0]           PROXY_SERVICE_RESOLVED_PROXY_LIST  
                                 --> pac_string = "DIRECT"
t=1317599994550 [st=0]       -PROXY_SERVICE       
t=1317599994550 [st=0]        HOST_RESOLVER_IMPL  [dt=0]
                              --> source_dependency = {"id":73847,"type":7}
t=1317599994551 [st=1]    -SOCKET_STREAM_CONNECT  
t=1317599994552 [st=2]     WEB_SOCKET_SEND_REQUEST_HEADERS  
                           --> GET / HTTP/1.1   
                               Upgrade: websocket
                               Connection: Upgrade
                               Host: localhost:8080
                               Sec-WebSocket-Origin: http://localhost:8080
                               Sec-WebSocket-Key: JFu57s6Wn6Ha4nPsRqVm9g==
                               Sec-WebSocket-Version: 8


t=1317599994552 [st=2]     SOCKET_STREAM_SENT     
t=1317599994554 [st=4]     SOCKET_STREAM_RECEIVED  
t=1317599994554 [st=4]     WEB_SOCKET_READ_RESPONSE_HEADERS  
                           --> HTTP/1.1 404 Not Found
                               Content-Type: text/html
                               Content-Length: 848
                               Server: Jetty(8.0.0.M3)


t=1317599994554 [st=4] -REQUEST_ALIVE       

WEB_SOCKET_READ_RESPONSE_HEADERS is not happy.

Original issue reported on code.google.com by mslinn on 3 Oct 2011 at 12:09

Attachments:

sendText/sendBinary error in WebSocket07.h

What steps will reproduce the problem?
1. Included the necessary header files & library needed
2. declare WebSocket object and call -(void) close method to connect to 
WebSocket
3. on - (void) didOpen delegate method, called - (void) sendText [in other 
tests, - (void) sendBinary is called], but application crashed

What is the expected output? What do you see instead?
Error message received was *** Terminating app due to uncaught exception 
'NSInvalidArgumentException', reason: '-[WebSocket sendBinary:]: unrecognized 
selector sent to instance 0x269640'

What version of the product are you using? On what operating system?
Using 2.1 version; xcode 4

Please provide any additional information below.
header files clearly indicate that - (void)sendText:(NSString*)message; and - 
(void)sendBinary:(NSData*)message; methods exists, and compiling my code does 
not cause any errors.  But once the app is executed, it crashes on those method 
calls.  Please advise

Original issue reported on code.google.com by [email protected] on 27 Jun 2011 at 2:22

read operation time out after 30 seconds idle

Websocket got disconnected after 30 seconds idle
I can't set "keepalive" to set heartbeat as there will be an error occurring at 
[WebSocket stopPingTimer] and force the app to close

I'm using the latest library.

Original issue reported on code.google.com by [email protected] on 30 Jul 2012 at 11:19

Attachments:

Timeout connecting to grizzly backend

What steps will reproduce the problem?
1. try to establish connection to backend using Glassfish 3.1 with grizzly
2.
3.

What is the expected output? What do you see instead?
Expected a connection but got a timeout on iphone and broken pipe exception on 
java backend

What version of the product are you using? On what operating system?
Mac OSX

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 5 Jul 2011 at 10:08

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.