Example: spdy functions

The following example shows the use of the spdy functions.

    web_set_sockets_option("SSL_VERSION", "TLS");

   // Navigate to the SPDY server.
    spdy_url("my_server:3000",
        "URL=https://my_server:3000/",
        "Resource=0",
        "Referer=",
        "Snapshot=t28.inf",
        "Mode=HTML",
        "SpdyStreamID=1",
        "SpdyPushCount=4",
        LAST);

    spdy_url("IsSpdy",
        "URL=https://my_server:3000/IsSpdy",
        "Resource=0",
        "RecContentType=text/html",
        "Referer=https://my_server:3000/",
        "Snapshot=t29.inf",
        "Mode=HTML",
        "SpdyStreamID=3",
        "SpdyPushCount=0",
        LAST);

	// Submit data(POST)
    spdy_submit_data("formhandler",
        "Action=https://my_server:3000/formhandler",
        "Method=POST",
        "RecContentType=text/html",
        "Referer=https://my_server:3000/",
        "Snapshot=t31.inf",
        "Mode=HTML",
        "SpdyStreamID=7",
        "SpdyPushCount=0",
        ITEMDATA,
        "Name=username", "Value=Guy", ENDITEM,
        "Name=userage", "Value=1", ENDITEM,
        "Name=country", "Value=Israel", ENDITEM,
        "Name=date1", "Value=", ENDITEM,
        "Name=num", "Value=1", ENDITEM,
        "Name=fname", "Value=", ENDITEM,
        "Name=email", "Value=", ENDITEM,
        "Name=opentext", "Value=", ENDITEM,
        "Name=t1", "Value=ABC", ENDITEM,
        "Name=town", "Value=ABC-ABC", ENDITEM,
        LAST);

    spdy_url("my_server:3000_2",
        "URL=https://my_server:3000/",
        "Resource=0",
        "Referer=",
        "Snapshot=t32.inf",
        "Mode=HTML",
        "SpdyStreamID=9",
        "SpdyPushCount=4",
        LAST);

    spdy_url("IsSpdy_2",
        "URL=https://my_server:3000/IsSpdy",
        "Resource=0",
        "RecContentType=text/html",
        "Referer=https://my_server:3000/",
        "Snapshot=t33.inf",
        "Mode=HTML",
        "SpdyStreamID=11",
        "SpdyPushCount=0",
        LAST);

    spdy_submit_data("image",
        "Action=https://my_server:3000/image",
        "Method=POST",
        "RecContentType=text/html",
        "Referer=https://my_server:3000/",
        "Snapshot=t34.inf",
        "Mode=HTML",
        "SpdyStreamID=13",
        "SpdyPushCount=0",
        ITEMDATA,
        LAST);

    spdy_url("my_server:3000_3",
        "URL=https://my_server:3000/",
        "Resource=0",
        "Referer=",
        "Snapshot=t35.inf",
        "Mode=HTML",
        "SpdyStreamID=15",
        "SpdyPushCount=4",
        LAST);

    spdy_url("IsSpdy_3",
        "URL=https://my_server:3000/IsSpdy",
        "Resource=0",
        "RecContentType=text/html",
        "Referer=https://my_server:3000/",
        "Snapshot=t36.inf",
        "Mode=HTML",
        "SpdyStreamID=17",
        "SpdyPushCount=0",
        LAST);

    // Request data from server (GET)
    spdy_url("time",
        "URL=https://my_server:3000/time",
        "Resource=0",
        "RecContentType=text/html",
        "Referer=https://my_server:3000/",
        "Snapshot=t37.inf",
        "Mode=HTML",
        "SpdyStreamID=19",
        "SpdyPushCount=0",
        LAST);