summaryrefslogtreecommitdiffstats
path: root/vendor/textalk/websocket/tests/scripts/client.connect-timeout.json
blob: c1ae6b5573a1b31fb096c3f0495721b142c5c13c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
[
    {
        "function": "stream_context_create",
        "params": [],
        "return": "@mock-stream-context"
    },
    {
        "function": "stream_socket_client",
        "params": [
            "tcp:\/\/localhost:8000",
            null,
            null,
            300,
            4,
            "@mock-stream-context"
        ],
        "return": "@mock-stream"
    },
    {
        "function": "get_resource_type",
        "params": [
            "@mock-stream"
        ],
        "return": "stream"
    },
    {
        "function": "stream_set_timeout",
        "params": [
            "@mock-stream",
            300
        ],
        "return": true
    },
    {
        "function": "fwrite",
        "params": [
            "@mock-stream"
        ],
        "return-op": "key-save",
        "return": 199
    },
    {
        "function": "stream_get_line",
        "params": [
            "@mock-stream",
            1024,
            "\r\n\r\n"
        ],
        "return-op": "key-respond",
        "return": "HTTP\/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: {key}"
    },
    {
        "function": "fwrite",
        "params": [
            "@mock-stream"
        ],
        "return": 13
    }
]