Module Expr Str Import alias TryExcept body Import alias handlers ExceptHandler type NameLoad body Pass ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Expr Str Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Global identifier Assign NameStore NameLoad If NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Global identifier Assign NameStore NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareNotIn Str NameLoad body Raise Call NameLoad Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad NameLoad keyword Str If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr orelse Raise Call NameLoad Str Assign NameStore Num If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore NameLoad If CompareEq NameLoad Str body If UnaryOpNot NameLoad body Assign NameStore Num orelse If CompareEq NameLoad Str body Assign NameStore NameLoad If UnaryOpNot NameLoad body Assign NameStore Num orelse Raise Call NameLoad BinOpMod Str NameLoad If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore Str If AttributeLoad NameLoad attr body AugAssignAdd NameStore BinOpAdd Str AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str TupleLoad Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr BoolOpOr BoolOpAnd CompareNotEq NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list Assign NameStore BinOpSub BinOpLShift Num Num Num Assign NameStore BinOpAdd Call NameLoad Call NameLoad Num BinOpAdd Num Num Call NameLoad Call NameLoad Num BinOpAdd Num Num Assign NameStore BinOpSub BinOpLShift Num Num Num FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr attr Str decorator_list Assign NameStore Dict Str Str Str Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list Assign NameStore TupleLoad Num Num FunctionDef arguments args defaults vararg body For NameStore NameLoad body If CompareNotIn NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Dict NameLoad NameLoad NameLoad NameLoad NameLoad Str Str Str Str Str Assign NameStore Num Assign NameStore BinOpLShift Num Num Assign NameStore BinOpLShift Num Num FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num Num Num NameLoad Num Str body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd CompareEq NameLoad AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Return Call NameLoad Num Num Num Num NameLoad Num NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad Str If CompareNotIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr If CompareGtE NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore ListLoad Assign NameStore Call NameLoad TupleLoad BinOpBitOr BinOpBitOr BinOpBitOr BinOpBitOr BinOpLShift AttributeLoad NameLoad attr Num BinOpLShift AttributeLoad NameLoad attr Num BinOpLShift AttributeLoad NameLoad attr Num BinOpLShift AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr If CompareLt NameLoad AttributeLoad NameLoad attr body AugAssignAdd NameStore Call NameLoad TupleLoad BinOpBitOr BinOpLShift AttributeLoad NameLoad attr Num NameLoad orelse If CompareLt NameLoad AttributeLoad NameLoad attr body AugAssignAdd NameStore Call NameLoad TupleLoad BinOpBitOr BinOpLShift AttributeLoad NameLoad attr Num Num AugAssignAdd NameStore Call AttributeLoad NameLoad attr Str NameLoad orelse AugAssignAdd NameStore Call NameLoad TupleLoad BinOpBitOr BinOpLShift AttributeLoad NameLoad attr Num Num AugAssignAdd NameStore Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Return BinOpAdd NameLoad AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr Num Return BinOpAdd NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Return BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad For NameStore Call NameLoad Call NameLoad NameLoad body AugAssignBitXor SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index BinOpMod NameLoad Num Return Call AttributeLoad NameLoad attr decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad TupleLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad NameLoad If NameLoad body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults kwarg body Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str If CompareEq NameLoad Num body Assign NameStore NameLoad orelse Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index Str orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str If NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If CompareNotEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareNotEq NameLoad NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str attr Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr attr Str attr Return CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore NameLoad Assign NameStore Dict If NameLoad body Expr Call AttributeLoad NameLoad attr Str While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If CompareEq NameLoad Str body Break Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num orelse Assign NameStore Call AttributeLoad NameLoad attr Str Num If CompareEq Call NameLoad NameLoad Num body Assign TupleStore NameStore NameStore NameLoad Assign SubscriptStore NameLoad Index Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr orelse Raise Call NameLoad Str If NameLoad body Expr Call AttributeLoad NameLoad attr Str Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr While NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If CompareEq NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Raise Call NameLoad BinOpMod Str NameLoad orelse If CompareIn AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Return TupleLoad AttributeLoad NameLoad attr NameLoad orelse If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num If UnaryOpNot NameLoad body Return NameLoad Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore BinOpBitAnd BinOpRShift NameLoad Num Num Assign NameStore BinOpBitAnd BinOpRShift NameLoad Num Num Assign NameStore BinOpBitAnd BinOpRShift NameLoad Num Num Assign NameStore BinOpBitAnd BinOpRShift NameLoad Num Num Assign NameStore BinOpBitAnd NameLoad Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore BinOpBitAnd BinOpRShift NameLoad Num Num Assign NameStore BinOpBitAnd NameLoad Num Assign NameStore Str If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str NameLoad Index Num orelse If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str NameLoad Index Num Assign NameStore Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore BinOpAdd BinOpAdd BinOpAdd NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad Str body Expr Str If BoolOpOr CompareLt NameLoad Num CompareGtE NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr Str NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad Str body Expr Str If AttributeLoad NameLoad attr body If BoolOpOr CompareLt NameLoad Num CompareGtE NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str TryExcept body Expr Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr Str NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num TryExcept body Assign NameStore Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr handlers ExceptHandler body Pass Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr handlers ExceptHandler body Pass Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore NameLoad Assign NameStore Str While NameLoad body AugAssignAdd NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpSub NameLoad Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Str body Break Return Call AttributeLoad Call AttributeLoad Str attr NameLoad attr Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad TupleLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Num body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults TupleLoad body Expr Str If AttributeLoad NameLoad attr body Raise Call NameLoad Str TryFinally body TryExcept body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr While AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIs NameLoad NameLoad body Break Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad finalbody Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg body If NameLoad body TryExcept body Expr Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body If Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list If CompareEq NameLoad Str body Expr Call NameLoad NameLoad Assign NameStore Call NameLoad Str Print Str Expr Call AttributeLoad NameLoad attr Str Print Str Print Str Assign NameStore Call AttributeLoad NameLoad attr Print BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr
N/A N/A 
websocket - WebSocket client library for Python

Copyright (C) 2010 Hiroki Ohtani(liris)

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

 N/A socket N/A N/A N/A ssl N/A N/A N/A ImportError N/A N/A urllib.parse urlparse N/A os N/A array N/A struct N/A uuid N/A hashlib N/A base64 N/A logging N/A 
websocket python client.
=========================

This version support only hybi-13.
Please see http://tools.ietf.org/html/rfc6455 for protocol.
 N/A VERSION 13 N/A STATUS_NORMAL 1000 N/A STATUS_GOING_AWAY 1001 N/A STATUS_PROTOCOL_ERROR 1002 N/A STATUS_UNSUPPORTED_DATA_TYPE 1003 N/A STATUS_STATUS_NOT_AVAILABLE 1005 N/A STATUS_ABNORMAL_CLOSED 1006 N/A STATUS_INVALID_PAYLOAD 1007 N/A STATUS_POLICY_VIOLATION 1008 N/A STATUS_MESSAGE_TOO_BIG 1009 N/A STATUS_INVALID_EXTENSION 1010 N/A STATUS_UNEXPECTED_CONDITION 1011 N/A STATUS_TLS_HANDSHAKE_ERROR 1015 N/A logger N/A N/A logging getLogger WebSocketException N/A Exception N/A N/A 
    websocket exeception class.
     N/A N/A WebSocketConnectionClosedException N/A WebSocketException N/A N/A 
    If remote host closed the connection or some network error happened,
    this exception will be raised.
     N/A N/A N/A default_timeout None N/A traceEnabled False enableTrace N/A N/A tracable N/A N/A N/A 
    turn on/off the tracability.

    tracable: boolean value. if set True, tracability is enabled.
     N/A traceEnabled N/A traceEnabled tracable N/A tracable N/A N/A N/A N/A logger handlers N/A N/A N/A N/A logger addHandler N/A N/A logging StreamHandler N/A N/A N/A logger setLevel N/A logging DEBUG N/A setdefaulttimeout N/A N/A timeout N/A N/A N/A 
    Set the global timeout setting to connect.

    timeout: default socket timeout time. This value is second.
     N/A default_timeout N/A default_timeout timeout N/A getdefaulttimeout N/A N/A N/A N/A N/A 
    Return the global timeout setting(second) to connect.
     N/A default_timeout N/A _parse_url N/A N/A url N/A N/A N/A 
    parse url and the result is tuple of
    (hostname, port, resource path and the flag of secure mode)

    url: url string.
     N/A N/A : url N/A N/A N/A ValueError url is invalid N/A N/A scheme url N/A N/A url split : 1 N/A parsed N/A urlparse url scheme http N/A N/A parsed hostname N/A N/A hostname N/A parsed hostname N/A N/A N/A ValueError hostname is invalid N/A port 0 N/A N/A parsed port N/A N/A port N/A parsed port N/A is_secure False N/A N/A scheme ws N/A N/A N/A port N/A N/A port 80 N/A N/A N/A scheme wss N/A N/A is_secure True N/A N/A port N/A N/A port 443 N/A N/A N/A ValueError N/A scheme %s is invalid scheme N/A N/A parsed path N/A N/A resource N/A parsed path N/A N/A resource / N/A N/A parsed query N/A N/A resource N/A ? N/A parsed query N/A N/A hostname port resource is_secure N/A create_connection N/A N/A url timeout N/A None options N/A N/A 
    connect to url and return websocket object.

    Connect to url and return the WebSocket object.
    Passing optional timeout parameter will set the timeout on the socket.
    If no timeout is supplied, the global default timeout setting returned by getdefauttimeout() is used.
    You can customize using 'options'.
    If you set "header" dict object, you can set your own custom header.

    >>> conn = create_connection("ws://echo.websocket.org/",
         ...     header=["User-Agent: MyProgram",
         ...             "x-custom: header"])


    timeout: socket timeout time. This value is integer.
             if you set None for this value, it means "use default_timeout value"

    options: current support option is only "header".
             if you set header as dict value, the custom HTTP headers are added.
     N/A sockopt N/A N/A options get sockopt N/A N/A websock N/A WebSocket sockopt sockopt N/A N/A N/A websock settimeout N/A N/A N/A timeout None timeout default_timeout N/A N/A N/A websock connect url options N/A websock N/A N/A _MAX_INTEGER N/A N/A 1 32 1 N/A _AVAILABLE_KEY_CHARS N/A N/A list N/A range 33 N/A 47 1 N/A list N/A range 58 N/A 126 1 N/A _MAX_CHAR_BYTE N/A N/A 1 8 1 _create_sec_websocket_key N/A N/A N/A N/A N/A uid N/A N/A uuid uuid4 N/A N/A N/A N/A N/A N/A N/A base64 encodebytes N/A uid bytes strip decode utf-8 N/A N/A _HEADERS_TO_CHECK N/A upgrade connection websocket upgrade _SSLSocketWrapper N/A object N/A __init__ N/A N/A self sock N/A N/A N/A N/A self _ssl N/A N/A ssl wrap_socket sock N/A recv N/A N/A self bufsize N/A N/A N/A N/A N/A N/A self _ssl read bufsize N/A send N/A N/A self payload N/A N/A N/A N/A N/A N/A self _ssl write payload N/A close N/A N/A self N/A N/A N/A N/A N/A N/A self _ssl close N/A N/A N/A _BOOL_VALUES N/A 0 1 _is_bool N/A N/A N/A values N/A N/A v values N/A N/A N/A v _BOOL_VALUES N/A N/A False N/A True N/A ABNF N/A object N/A N/A 
    ABNF frame class.
    see http://tools.ietf.org/html/rfc5234
    and http://tools.ietf.org/html/rfc6455#section-5.2
     N/A OPCODE_TEXT 1 N/A OPCODE_BINARY 2 N/A OPCODE_CLOSE 8 N/A OPCODE_PING 9 N/A OPCODE_PONG 10 N/A OPCODES N/A OPCODE_TEXT OPCODE_BINARY OPCODE_CLOSE OPCODE_PING OPCODE_PONG N/A OPCODE_MAP N/A OPCODE_TEXT OPCODE_BINARY OPCODE_CLOSE OPCODE_PING OPCODE_PONG text binary close ping pong N/A LENGTH_7 125 N/A LENGTH_16 N/A 1 16 N/A LENGTH_63 N/A 1 63 __init__ N/A N/A self fin rsv1 rsv2 rsv3 opcode mask data N/A 0 0 0 0 OPCODE_TEXT 1 N/A N/A 
        Constructor for ABNF.
        please check RFC for arguments.
         N/A N/A self fin fin N/A N/A self rsv1 rsv1 N/A N/A self rsv2 rsv2 N/A N/A self rsv3 rsv3 N/A N/A self opcode opcode N/A N/A self mask mask N/A N/A self data data N/A N/A self get_mask_key N/A os urandom N/A create_frame N/A N/A data opcode N/A N/A N/A 
        create frame to send text, binary and other data.

        data: data to send. This is string value(byte array).
            if opcode is OPCODE_TEXT and this value is uniocde,
            data value is conveted into unicode string, automatically.

        opcode: operation code. please see OPCODE_XXX.
         N/A N/A N/A opcode N/A ABNF OPCODE_TEXT N/A isinstance data str N/A N/A data N/A N/A data encode utf-8 N/A N/A ABNF 1 0 0 0 opcode 1 data N/A staticmethod format N/A N/A self N/A N/A N/A 
        format this object to string(byte array) to send data to server.
         N/A N/A N/A _is_bool N/A self fin N/A self rsv1 N/A self rsv2 N/A self rsv3 N/A N/A N/A ValueError not 0 or 1 N/A N/A N/A self opcode N/A ABNF OPCODES N/A N/A N/A ValueError Invalid OPCODE N/A length N/A len N/A self data N/A N/A length N/A ABNF LENGTH_63 N/A N/A N/A ValueError data is too long N/A frame_header N/A N/A frame_header N/A bytes N/A N/A N/A N/A N/A N/A N/A self fin 7 N/A N/A self rsv1 6 N/A N/A self rsv2 5 N/A N/A self rsv3 4 N/A self opcode N/A N/A length N/A ABNF LENGTH_7 N/A N/A frame_header N/A bytes N/A N/A N/A N/A self mask 7 length N/A N/A N/A length N/A ABNF LENGTH_16 N/A N/A frame_header N/A bytes N/A N/A N/A N/A self mask 7 126 N/A frame_header N/A N/A struct pack !H length N/A N/A frame_header N/A bytes N/A N/A N/A N/A self mask 7 127 N/A frame_header N/A N/A struct pack !Q length N/A N/A N/A self mask N/A N/A N/A frame_header N/A self data N/A N/A mask_key N/A N/A self get_mask_key 4 N/A N/A frame_header N/A N/A self _get_masked mask_key N/A _get_masked N/A N/A self mask_key N/A N/A N/A s N/A N/A ABNF mask mask_key N/A self data N/A N/A mask_key s N/A mask N/A N/A mask_key data N/A N/A N/A 
        mask or unmask data. Just do xor for each byte

        mask_key: 4 byte string(byte).

        data: data to mask/unmask.
         N/A _m N/A N/A array array B mask_key N/A _d N/A N/A array array B data N/A i N/A range N/A len _d N/A N/A N/A _d N/A i N/A _m N/A N/A i 4 N/A N/A N/A _d tobytes N/A staticmethod N/A WebSocket N/A object N/A N/A 
    Low level WebSocket interface.
    This class is based on
      The WebSocket protocol draft-hixie-thewebsocketprotocol-76
      http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76

    We can connect to the websocket server and send/recieve data.
    The following example is a echo client.

    >>> import websocket
    >>> ws = websocket.WebSocket()
    >>> ws.connect("ws://echo.websocket.org")
    >>> ws.send("Hello, Server")
    >>> ws.recv()
    'Hello, Server'
    >>> ws.close()

    get_mask_key: a callable to produce new mask keys, see the set_mask_key
      function's docstring for more details
    sockopt: values for socket.setsockopt.
        sockopt must be tuple and each element is argument of sock.setscokopt.
     __init__ N/A N/A self get_mask_key sockopt N/A None N/A N/A N/A 
        Initalize WebSocket object.
         N/A N/A self connected False N/A N/A self sock N/A N/A socket socket N/A opts sockopt N/A N/A N/A N/A N/A self sock setsockopt opts N/A N/A self get_mask_key get_mask_key N/A set_mask_key N/A N/A self func N/A N/A N/A 
        set function to create musk key. You can custumize mask key generator.
        Mainly, this is for testing purpose.

        func: callable object. the fuct must 1 argument as integer.
              The argument means length of mask key.
              This func must be return string(byte array),
              which length is argument specified.
         N/A N/A self get_mask_key func N/A settimeout N/A N/A self timeout N/A N/A N/A 
        Set the timeout to the websocket.

        timeout: timeout time(second).
         N/A N/A N/A N/A self sock settimeout timeout N/A gettimeout N/A N/A self N/A N/A N/A 
        Get the websocket timeout(second).
         N/A N/A N/A N/A self sock gettimeout N/A connect N/A N/A self url N/A options N/A N/A 
        Connect to url. url is websocket url scheme. ie. ws://host:port/resource
        You can customize using 'options'.
        If you set "header" dict object, you can set your own custom header.

        >>> ws = WebSocket()
        >>> ws.connect("ws://echo.websocket.org/",
                ...     header={"User-Agent: MyProgram",
                ...             "x-custom: header"})

        timeout: socket timeout time. This value is integer.
                 if you set None for this value,
                 it means "use default_timeout value"

        options: current support option is only "header".
                 if you set header as dict value,
                 the custom HTTP headers are added.

         N/A N/A hostname port resource is_secure N/A _parse_url url N/A N/A N/A N/A self sock connect N/A hostname port N/A is_secure N/A N/A N/A self sock N/A _SSLSocketWrapper N/A self sock N/A N/A N/A self _handshake hostname port resource options N/A _handshake N/A N/A self host port resource N/A options N/A N/A sock N/A self sock N/A headers N/A N/A N/A N/A headers append N/A GET %s HTTP/1.1 resource N/A N/A N/A headers append Upgrade: websocket N/A N/A N/A headers append Connection: Upgrade N/A N/A port 80 N/A N/A hostport host N/A N/A hostport N/A %s:%d N/A host port N/A N/A N/A headers append N/A Host: %s hostport N/A N/A origin options N/A N/A N/A N/A headers append N/A Origin: %s N/A options N/A origin N/A N/A N/A N/A headers append N/A Origin: %s hostport N/A key N/A _create_sec_websocket_key N/A N/A N/A headers append N/A Sec-WebSocket-Key: %s key N/A N/A N/A headers append N/A Sec-WebSocket-Version: %s VERSION N/A N/A header options N/A N/A N/A N/A headers extend N/A options N/A header N/A N/A N/A headers append N/A N/A N/A headers append N/A header_str N/A N/A join headers N/A N/A N/A sock send N/A bytes header_str utf-8 N/A traceEnabled N/A N/A N/A N/A logger debug --- request header --- N/A N/A N/A logger debug header_str N/A N/A N/A logger debug ----------------------- N/A N/A status resp_headers N/A N/A self _read_headers N/A N/A status 101 N/A N/A N/A N/A self close N/A N/A WebSocketException N/A Handshake Status %d status N/A success N/A N/A self _validate_header resp_headers key N/A N/A success N/A N/A N/A N/A self close N/A N/A WebSocketException Invalid WebSocket Header N/A N/A self connected True N/A _validate_header N/A N/A self headers key N/A N/A N/A N/A k v N/A N/A _HEADERS_TO_CHECK items N/A N/A r N/A N/A headers get k None N/A N/A r N/A N/A False N/A r N/A N/A r lower N/A N/A v r N/A N/A False N/A result N/A N/A headers get sec-websocket-accept None N/A N/A result N/A N/A False N/A result N/A N/A result lower N/A value N/A key 258EAFA5-E914-47DA-95CA-C5AB0DC85B11 N/A digest N/A N/A N/A N/A hashlib sha1 N/A bytes value utf-8 digest N/A hashed N/A N/A N/A N/A N/A N/A N/A N/A base64 encodebytes digest strip decode utf-8 lower N/A N/A hashed result N/A _read_headers N/A N/A self N/A N/A N/A status None N/A headers N/A N/A traceEnabled N/A N/A N/A N/A logger debug --- response header --- N/A True N/A N/A line N/A N/A self _recv_line N/A N/A line N/A N/A N/A line N/A N/A line strip N/A traceEnabled N/A N/A N/A N/A logger debug line N/A N/A status N/A N/A status_info N/A N/A line split 2 N/A status N/A int N/A status_info N/A 1 N/A N/A kv N/A N/A line split : 1 N/A N/A N/A len kv 2 N/A N/A N/A key value kv N/A N/A headers N/A N/A N/A key lower N/A N/A N/A N/A value strip lower N/A N/A N/A WebSocketException Invalid header N/A traceEnabled N/A N/A N/A N/A logger debug ----------------------- N/A N/A status headers N/A send N/A N/A self payload opcode N/A N/A ABNF OPCODE_TEXT N/A N/A 
        Send the data as string.

        payload: Payload must be utf-8 bytes or str,
                  if the opcode is OPCODE_TEXT.
                  Otherwise, it must be byte array

        opcode: operation code to send. Please see OPCODE_XXX.
         N/A N/A isinstance payload str N/A N/A payload N/A bytes payload utf-8 N/A frame N/A N/A ABNF create_frame payload opcode N/A N/A self get_mask_key N/A N/A N/A frame get_mask_key N/A self get_mask_key N/A data N/A N/A frame format N/A data N/A N/A l N/A N/A N/A self sock send data N/A data N/A data N/A l N/A traceEnabled N/A N/A N/A N/A logger debug N/A send:  N/A repr data N/A ping N/A N/A self payload N/A N/A N/A 
        send ping data.

        payload: data payload to send server.
         N/A N/A N/A self send payload N/A ABNF OPCODE_PING N/A pong N/A N/A self payload N/A N/A N/A 
        send pong data.

        payload: data payload to send server.
         N/A N/A N/A self send payload N/A ABNF OPCODE_PONG N/A recv N/A N/A self N/A N/A N/A 
        Receive string data(byte array) from the server.

        return value: string(byte array) value.
         N/A N/A opcode data N/A N/A self recv_data N/A N/A opcode N/A ABNF OPCODE_TEXT N/A N/A N/A N/A data decode utf-8 N/A data N/A recv_data N/A N/A self N/A N/A N/A 
        Recieve data with operation code.

        return  value: tuple of operation code and string(byte array) value.
         N/A True N/A N/A frame N/A N/A self recv_frame N/A N/A frame N/A N/A N/A WebSocketException N/A Not a valid frame %s frame N/A N/A N/A N/A frame opcode N/A N/A ABNF OPCODE_TEXT N/A ABNF OPCODE_BINARY N/A N/A N/A N/A frame opcode N/A frame data N/A N/A N/A N/A frame opcode N/A ABNF OPCODE_CLOSE N/A N/A N/A N/A self send_close N/A N/A N/A frame opcode None N/A N/A N/A N/A frame opcode N/A ABNF OPCODE_PING N/A N/A N/A N/A self pong N/A frame data N/A recv_frame N/A N/A self N/A N/A N/A 
        recieve data as frame from server.

        return value: ABNF frame object.
         N/A header_bytes N/A N/A self _recv_strict 2 N/A N/A header_bytes N/A N/A None N/A b1 N/A header_bytes N/A 0 N/A fin N/A N/A b1 7 1 N/A rsv1 N/A N/A b1 6 1 N/A rsv2 N/A N/A b1 5 1 N/A rsv3 N/A N/A b1 4 1 N/A opcode N/A b1 15 N/A b2 N/A header_bytes N/A 1 N/A mask N/A N/A b2 7 1 N/A length N/A b2 127 N/A length_data N/A N/A length 126 N/A N/A length_data N/A N/A self _recv_strict 2 N/A length N/A N/A N/A struct unpack !H length_data N/A 0 N/A N/A N/A length 127 N/A N/A length_data N/A N/A self _recv_strict 8 N/A length N/A N/A N/A struct unpack !Q length_data N/A 0 N/A mask_key N/A mask N/A N/A mask_key N/A N/A self _recv_strict 4 N/A data N/A N/A self _recv_strict length N/A traceEnabled N/A N/A recieved N/A N/A N/A header_bytes length_data mask_key data N/A N/A N/A logger debug N/A recv:  N/A repr recieved N/A mask N/A N/A data N/A N/A ABNF mask mask_key data N/A frame N/A ABNF fin rsv1 rsv2 rsv3 opcode mask data N/A frame N/A send_close N/A N/A self status reason N/A STATUS_NORMAL N/A N/A 
        send close data to the server.

        status: status code to send. see STATUS_XXX.

        reason: the reason to close. This must be string.
         N/A N/A N/A status 0 N/A status N/A ABNF LENGTH_16 N/A N/A N/A ValueError code is invalid range N/A N/A N/A self send N/A N/A N/A struct pack !H status reason N/A ABNF OPCODE_CLOSE N/A close N/A N/A self status reason N/A STATUS_NORMAL N/A N/A 
        Close Websocket object

        status: status code to send. see STATUS_XXX.

        reason: the reason to close. This must be string.
         N/A N/A self connected N/A N/A N/A N/A status 0 N/A status N/A ABNF LENGTH_16 N/A N/A N/A ValueError code is invalid range N/A N/A N/A N/A N/A self send N/A N/A N/A struct pack !H status reason N/A ABNF OPCODE_CLOSE N/A timeout N/A N/A N/A self sock gettimeout N/A N/A N/A N/A self sock settimeout 3 N/A N/A N/A frame N/A N/A self recv_frame N/A N/A N/A logger isEnabledFor N/A logging DEBUG N/A N/A N/A N/A logger error N/A close status:  N/A repr N/A frame data N/A N/A N/A N/A N/A N/A N/A N/A self sock settimeout timeout N/A N/A N/A N/A self sock shutdown N/A socket SHUT_RDWR N/A N/A N/A N/A N/A N/A N/A self _closeInternal N/A _closeInternal N/A N/A self N/A N/A N/A N/A self connected False N/A N/A N/A N/A self sock close N/A _recv N/A N/A self bufsize N/A N/A N/A bytes N/A N/A N/A self sock recv bufsize N/A N/A bytes N/A N/A N/A WebSocketConnectionClosedException N/A bytes N/A _recv_strict N/A N/A self bufsize N/A N/A N/A remaining bufsize N/A bytes N/A remaining N/A N/A bytes N/A N/A self _recv remaining N/A remaining N/A bufsize N/A len bytes N/A bytes N/A _recv_line N/A N/A self N/A N/A N/A line N/A N/A True N/A N/A c N/A N/A self _recv 1 N/A N/A N/A line append c N/A N/A c N/A N/A N/A N/A N/A N/A N/A join line decode utf-8 N/A N/A WebSocketApp N/A object N/A N/A 
    Higher level of APIs are provided.
    The interface is like JavaScript WebSocket object.
     __init__ N/A N/A self url header on_open on_message on_error on_close keep_running get_mask_key sockopt N/A N/A None None None None True None N/A N/A N/A 
        url: websocket url.
        header: custom header for websocket handshake.
        on_open: callable object which is called at opening websocket.
          this function has one argument. The arugment is this class object.
        on_message: callbale object which is called when recieved data.
         on_message has 2 arguments.
         The 1st arugment is this class object.
         The passing 2nd arugment is utf-8 string which we get from the server.
       on_error: callable object which is called when we get error.
         on_error has 2 arguments.
         The 1st arugment is this class object.
         The passing 2nd arugment is exception object.
       on_close: callable object which is called when closed the connection.
         this function has one argument. The arugment is this class object.
       keep_running: a boolean flag indicating whether the app's main loop should
         keep running, defaults to True
       get_mask_key: a callable to produce new mask keys, see the WebSocket.set_mask_key's
         docstring for more information
         N/A N/A self url url N/A N/A self header header N/A N/A self on_open on_open N/A N/A self on_message on_message N/A N/A self on_error on_error N/A N/A self on_close on_close N/A N/A self keep_running keep_running N/A N/A self get_mask_key get_mask_key N/A N/A self sock None N/A send N/A N/A self data opcode N/A N/A ABNF OPCODE_TEXT N/A N/A 
        send message.
        data: message to send. If you set opcode to OPCODE_TEXT, data must be utf-8 string or unicode.
        opcode: operation code of data. default is OPCODE_TEXT.
         N/A N/A N/A N/A N/A self sock send data opcode 0 N/A N/A N/A WebSocketConnectionClosedException N/A close N/A N/A self N/A N/A N/A 
        close websocket connection.
         N/A N/A self keep_running False N/A N/A N/A N/A self sock close N/A run_forever N/A N/A self sockopt N/A N/A N/A N/A 
        run event loop for WebSocket framework.
        This loop is infinite loop and is alive during websocket is available.
        sockopt: values for socket.setsockopt.
            sockopt must be tuple and each element is argument of sock.setscokopt.
         N/A N/A self sock N/A N/A N/A WebSocketException socket is already opened N/A N/A N/A N/A N/A N/A self sock N/A WebSocket N/A self get_mask_key sockopt sockopt N/A N/A N/A N/A self sock connect N/A self url header N/A self header N/A N/A N/A self _run_with_no_err N/A self on_open N/A N/A self keep_running N/A N/A data N/A N/A N/A self sock recv N/A N/A data None N/A N/A N/A N/A N/A self _run_with_no_err N/A self on_message data N/A N/A N/A Exception N/A e N/A N/A N/A N/A self _run_with_no_err N/A self on_error e N/A N/A N/A N/A N/A self sock close N/A N/A N/A self _run_with_no_err N/A self on_close N/A N/A self sock None N/A _run_with_no_err N/A N/A self callback N/A args N/A N/A callback N/A N/A N/A N/A N/A callback self args N/A N/A N/A Exception N/A e N/A N/A N/A N/A logger isEnabledFor N/A logging DEBUG N/A N/A N/A N/A logger error e N/A N/A N/A N/A __name__ __main__ N/A N/A N/A enableTrace True N/A ws N/A create_connection ws://echo.websocket.org/ N/A Sending 'Hello, World'... N/A N/A N/A ws send Hello, World N/A Sent N/A Receiving... N/A result N/A N/A ws recv N/A N/A Received '%s' result N/A N/A N/A ws close