Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] spdy client

Hey Ryan,

you don't need i-jetty (that's a jetty server) to run a spdy client. You just need the jetty-spdy jars and then implement a spdy client in your java code. Unfortunately we're still working on documentation for spdy-client. I hope I can finish the documentation within this week.

Until then please have a look at the the test classes using spdy-client to test our spdy server implementation.

Here's some of the tests you migh refer to as an example:

http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http

AbstractHTTPSPDYTest.startClient() does the client setup.

http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/AbstractHTTPSPDYTest.java

SSLExternalServerTest uses the client to connect to some google page:

http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/jetty-spdy/spdy-http-server/src/test/java/org/eclipse/jetty/spdy/server/http/SSLExternalServerTest.java

Cheers,
Thomas

Am 7/22/13 4:17 AM, schrieb Ryan Young:
Thanks for your reply, I would try that later, by the way, is there any
examples using jetty to write a spdy client on android platform?
Seems i-jetty is the android version of jetty but it does not support spdy.


2013/7/22 Simone Bordet <sbordet@xxxxxxxxxxx <mailto:sbordet@xxxxxxxxxxx>>

    Hi,

    On Sun, Jul 21, 2013 at 1:03 PM, Ryan Young
    <ryanyoung.soloy@xxxxxxxxx <mailto:ryanyoung.soloy@xxxxxxxxx>> wrote:
     > Hi,
     > I'm newbie to Jetty and recently wanna try to use jetty spdy
    client to
     > connect to my proxy(shrpx + squid), but when I just added
     > StreamFrameListener codes in my activity:
     >
     > ##
     > StreamFrameListener streamListener = new
    StreamFrameListener.Adapter() {
     >
     >      public void onData(Stream stream, DataInfo dataInfo)  {
     >          // Data received from server
     >          String content = dataInfo.asString("UTF-8", true);
     >          System.out.println("SPDY content: " + content);
     >      }
     >   };
     > ##
     > the logcat returns error as:
     > 07-21 10:39:21.466: W/dalvikvm(2214): Unable to resolve superclass of
     > Lcom/example/ndkfoo/MainActivity$2; (848)
     > 07-21 10:39:21.517: W/dalvikvm(2214): Link of class
     > 'Lcom/example/ndkfoo/MainActivity$2;' failed
     > 07-21 10:39:21.517: E/dalvikvm(2214): Could not find class
     > 'com.example.ndkfoo.MainActivity$2', referenced from method
     > com.example.ndkfoo.MainActivity.<init>
     > 07-21 10:39:21.517: W/dalvikvm(2214): VFY: unable to resolve
    new-instance
     > 543 (Lcom/example/ndkfoo/MainActivity$2;) in
     > Lcom/example/ndkfoo/MainActivity;
     > ...
     >
     > Any suggestion would be appreciated.

    The Jetty SPDY implementation requires JDK 7.
    Now, it seems that JDK 7 is somewhat supported on Android and that is
    a news for me (I started this email replying that Android did not
    support JDK 7, but seems I am wrong).

    The error seems to indicate that spdy-client.jar has not been
    dex-ified and therefore StreamFrameListener.Adapter can't be found.
    Is that the case ?

    --
    Simone Bordet
    ----
    http://cometd.org
    http://webtide.com
    http://intalio.com
    Developer advice, training, services and support
    from the Jetty & CometD experts.
    Intalio, the modern way to build business applications.
    _______________________________________________
    jetty-users mailing list
    jetty-users@xxxxxxxxxxx <mailto:jetty-users@xxxxxxxxxxx>
    https://dev.eclipse.org/mailman/listinfo/jetty-users




_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users




Back to the top