Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def on_message(ws, message):
- print "Prisla data:"
- #print message
- request = abstract_pb2.Request()
- header = abstract_pb2.Header()
- request.ParseFromString(message)
- print request.data
- if (header.type == "Test" ):
- test = test_pb2.Test()
- test.name = message
- print test.name
- # -------------------------------- po spusteni a poslani dat "abc":
- /usr/bin/python2.7 /home/martin/PycharmProjects/MEO_kamera/wsMEOcallbackPROTOBUFF_abstract.py
- --- request header ---
- GET /ws/protobuf/75?access_token=67bde5d1b5f14520a565d03deae877fb HTTP/1.1
- Upgrade: websocket
- Connection: Upgrade
- Host: 194.228.153.100:9000
- Origin: http://194.228.153.100:9000
- Sec-WebSocket-Key: hdcLj9FCQ5+apyb7oQW35g==
- Sec-WebSocket-Version: 13
- head2:value2
- head1:value1
- -----------------------
- --- response header ---
- HTTP/1.1 101 Switching Protocols
- Upgrade: websocket
- Connection: Upgrade
- Sec-WebSocket-Accept: eAqTkqnkuiGgBeJU8aY68MGLR00=
- -----------------------
- Prisla data:
- abc
Advertisement
Add Comment
Please, Sign In to add comment