Lines Matching refs:ws

13     ws = TestApplicationWebsocket()  variable in TestNodeWebsockets
26 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
32 frame = self.ws.frame_read(sock)
35 assert frame['opcode'] == self.ws.OP_CLOSE, 'close opcode'
42 if opcode == self.ws.OP_BINARY or not decode:
54 resp, sock, key = self.ws.upgrade()
60 assert resp['headers']['Sec-WebSocket-Accept'] == self.ws.accept(
69 _, sock, _ = self.ws.upgrade()
71 self.ws.frame_write(sock, self.ws.OP_TEXT, message)
72 frame = self.ws.frame_read(sock)
76 self.ws.frame_write(sock, self.ws.OP_TEXT, message)
77 frame = self.ws.frame_read(sock)
88 _, sock, _ = self.ws.upgrade()
90 self.ws.frame_write(sock, self.ws.OP_TEXT, message, mask=False)
92 frame = self.ws.frame_read(sock)
94 assert frame['opcode'] == self.ws.OP_CLOSE, 'no mask opcode'
104 _, sock, _ = self.ws.upgrade()
106 self.ws.frame_write(sock, self.ws.OP_TEXT, message, fin=False)
107 self.ws.frame_write(sock, self.ws.OP_CONT, ' ', fin=False)
108 self.ws.frame_write(sock, self.ws.OP_CONT, message)
110 frame = self.ws.frame_read(sock)
123 _, sock, _ = self.ws.upgrade()
125 self.ws.frame_write(sock, self.ws.OP_PING, message, fin=False)
127 frame = self.ws.frame_read(sock)
135 'opcode': self.ws.OP_CLOSE,
148 _, sock, _ = self.ws.upgrade()
150 self.ws.frame_write(sock, self.ws.OP_TEXT, message)
152 frame = self.ws.frame_read(sock)
155 frame = self.ws.frame_read(sock)
168 _, sock1, _ = self.ws.upgrade()
169 _, sock2, _ = self.ws.upgrade()
171 self.ws.frame_write(sock1, self.ws.OP_TEXT, message1)
172 self.ws.frame_write(sock2, self.ws.OP_TEXT, message2)
174 frame1 = self.ws.frame_read(sock1)
175 frame2 = self.ws.frame_read(sock2)
193 'Sec-WebSocket-Key': self.ws.key(),
204 resp, sock, _ = self.ws.upgrade(
209 'Sec-WebSocket-Key': self.ws.key(),
226 'Sec-WebSocket-Key': self.ws.key(),
242 'Sec-WebSocket-Key': self.ws.key(),
266 key = self.ws.key()
290 'Sec-WebSocket-Key': self.ws.key(),
306 'Sec-WebSocket-Key': self.ws.key(),
323 'Sec-WebSocket-Key': self.ws.key(),
335 key = self.ws.key()
336 resp, sock, _ = self.ws.upgrade(
350 assert resp['headers']['Sec-WebSocket-Accept'] == self.ws.accept(
363 opcode = self.ws.OP_TEXT
365 _, sock, _ = self.ws.upgrade()
370 self.ws.frame_write(sock, opcode, payload, chopsize=chopsize)
372 frame = self.ws.frame_read(sock)
389 opcode = self.ws.OP_BINARY
391 _, sock, _ = self.ws.upgrade()
396 self.ws.frame_write(sock, opcode, payload, chopsize=chopsize)
397 frame = self.ws.frame_read(sock)
415 op_ping = self.ws.OP_PING
416 op_pong = self.ws.OP_PONG
418 _, sock, _ = self.ws.upgrade()
421 self.ws.frame_write(sock, op_ping, payload, chopsize=chopsize)
422 frame = self.ws.frame_read(sock)
436 _, sock, _ = self.ws.upgrade()
438 self.ws.frame_write(sock, self.ws.OP_PING, b'\xfe' * 126)
446 _, sock, _ = self.ws.upgrade()
448 self.ws.frame_write(sock, self.ws.OP_PONG, '')
453 self.ws.frame_write(sock, self.ws.OP_PONG, 'unsolicited pong payload')
460 self.ws.frame_write(sock, self.ws.OP_PONG, 'unsolicited pong payload')
461 self.ws.frame_write(sock, self.ws.OP_PING, payload)
463 frame = self.ws.frame_read(sock)
464 self.check_frame(frame, True, self.ws.OP_PONG, payload)
473 _, sock, _ = self.ws.upgrade()
476 self.ws.frame_write(sock, self.ws.OP_PING, 'payload-%d' % i)
479 frame = self.ws.frame_read(sock)
480 self.check_frame(frame, True, self.ws.OP_PONG, 'payload-%d' % i)
485 opcode = self.ws.OP_PING
486 self.ws.frame_write(sock, opcode, 'payload-%d' % i, chopsize=1)
489 frame = self.ws.frame_read(sock)
490 self.check_frame(frame, True, self.ws.OP_PONG, 'payload-%d' % i)
502 _, sock, _ = self.ws.upgrade()
504 self.ws.frame_write(sock, self.ws.OP_TEXT, payload, rsv1=True)
509 _, sock, _ = self.ws.upgrade()
511 self.ws.frame_write(sock, self.ws.OP_TEXT, payload)
512 self.ws.frame_write(sock, self.ws.OP_TEXT, payload, rsv2=True)
513 self.ws.frame_write(sock, self.ws.OP_PING, '')
515 frame = self.ws.frame_read(sock)
516 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
525 _, sock, _ = self.ws.upgrade()
527 self.ws.frame_write(sock, self.ws.OP_TEXT, payload)
529 frame = self.ws.frame_read(sock)
530 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
532 self.ws.frame_write(
533 sock, self.ws.OP_TEXT, payload, rsv1=True, rsv2=True
543 _, sock, _ = self.ws.upgrade()
545 self.ws.frame_write(sock, self.ws.OP_TEXT, payload, chopsize=1)
546 self.ws.frame_write(
547 sock, self.ws.OP_TEXT, payload, rsv3=True, chopsize=1
549 self.ws.frame_write(sock, self.ws.OP_PING, '')
551 frame = self.ws.frame_read(sock)
552 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
561 _, sock, _ = self.ws.upgrade()
563 self.ws.frame_write(
565 self.ws.OP_BINARY,
575 _, sock, _ = self.ws.upgrade()
577 self.ws.frame_write(
578 sock, self.ws.OP_PING, payload, rsv2=True, rsv3=True
585 _, sock, _ = self.ws.upgrade()
587 self.ws.frame_write(
588 sock, self.ws.OP_CLOSE, payload, rsv1=True, rsv2=True, rsv3=True
600 _, sock, _ = self.ws.upgrade()
602 self.ws.frame_write(sock, 0x03, '')
607 _, sock, _ = self.ws.upgrade()
609 self.ws.frame_write(sock, 0x04, 'reserved opcode payload')
614 _, sock, _ = self.ws.upgrade()
616 self.ws.frame_write(sock, self.ws.OP_TEXT, payload)
618 frame = self.ws.frame_read(sock)
619 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
621 self.ws.frame_write(sock, 0x05, '')
622 self.ws.frame_write(sock, self.ws.OP_PING, '')
628 _, sock, _ = self.ws.upgrade()
630 self.ws.frame_write(sock, self.ws.OP_TEXT, payload)
632 frame = self.ws.frame_read(sock)
633 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
635 self.ws.frame_write(sock, 0x06, payload)
636 self.ws.frame_write(sock, self.ws.OP_PING, '')
642 _, sock, _ = self.ws.upgrade()
644 self.ws.frame_write(sock, self.ws.OP_TEXT, payload, chopsize=1)
646 frame = self.ws.frame_read(sock)
647 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
649 self.ws.frame_write(sock, 0x07, payload, chopsize=1)
650 self.ws.frame_write(sock, self.ws.OP_PING, '')
656 _, sock, _ = self.ws.upgrade()
658 self.ws.frame_write(sock, 0x0B, '')
663 _, sock, _ = self.ws.upgrade()
665 self.ws.frame_write(sock, 0x0C, 'reserved opcode payload')
670 _, sock, _ = self.ws.upgrade()
672 self.ws.frame_write(sock, self.ws.OP_TEXT, payload)
674 frame = self.ws.frame_read(sock)
675 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
677 self.ws.frame_write(sock, 0x0D, '')
678 self.ws.frame_write(sock, self.ws.OP_PING, '')
684 _, sock, _ = self.ws.upgrade()
686 self.ws.frame_write(sock, self.ws.OP_TEXT, payload)
688 frame = self.ws.frame_read(sock)
689 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
691 self.ws.frame_write(sock, 0x0E, payload)
692 self.ws.frame_write(sock, self.ws.OP_PING, '')
698 _, sock, _ = self.ws.upgrade()
700 self.ws.frame_write(sock, self.ws.OP_TEXT, payload, chopsize=1)
702 frame = self.ws.frame_read(sock)
703 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
705 self.ws.frame_write(sock, 0x0F, payload, chopsize=1)
706 self.ws.frame_write(sock, self.ws.OP_PING, '')
715 _, sock, _ = self.ws.upgrade()
717 self.ws.frame_write(sock, self.ws.OP_PING, 'fragment1', fin=False)
718 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment2', fin=True)
723 _, sock, _ = self.ws.upgrade()
725 self.ws.frame_write(sock, self.ws.OP_PONG, 'fragment1', fin=False)
726 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment2', fin=True)
731 _, sock, _ = self.ws.upgrade()
733 self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment1', fin=False)
734 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment2', fin=True)
736 frame = self.ws.frame_read(sock)
737 self.check_frame(frame, True, self.ws.OP_TEXT, 'fragment1fragment2')
741 self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment1', fin=False)
743 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment2', fin=True)
745 frame = self.ws.frame_read(sock)
746 self.check_frame(frame, True, self.ws.OP_TEXT, 'fragment1fragment2')
750 self.ws.frame_write(
751 sock, self.ws.OP_TEXT, 'fragment1', fin=False, chopsize=1
753 self.ws.frame_write(
754 sock, self.ws.OP_CONT, 'fragment2', fin=True, chopsize=1
757 frame = self.ws.frame_read(sock)
758 self.check_frame(frame, True, self.ws.OP_TEXT, 'fragment1fragment2')
764 self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment1', fin=False)
765 self.ws.frame_write(sock, self.ws.OP_PING, ping_payload)
766 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment2', fin=True)
768 frame = self.ws.frame_read(sock)
769 self.check_frame(frame, True, self.ws.OP_PONG, ping_payload)
771 frame = self.ws.frame_read(sock)
772 self.check_frame(frame, True, self.ws.OP_TEXT, 'fragment1fragment2')
778 self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment1', fin=False)
781 self.ws.frame_write(sock, self.ws.OP_PING, ping_payload)
783 frame = self.ws.frame_read(sock)
784 self.check_frame(frame, True, self.ws.OP_PONG, ping_payload)
786 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment2', fin=True)
788 frame = self.ws.frame_read(sock)
789 self.check_frame(frame, True, self.ws.OP_TEXT, 'fragment1fragment2')
795 self.ws.frame_write(
796 sock, self.ws.OP_TEXT, 'fragment1', fin=False, chopsize=1
798 self.ws.frame_write(sock, self.ws.OP_PING, ping_payload, chopsize=1)
799 self.ws.frame_write(
800 sock, self.ws.OP_CONT, 'fragment2', fin=True, chopsize=1
803 frame = self.ws.frame_read(sock)
804 self.check_frame(frame, True, self.ws.OP_PONG, ping_payload)
806 frame = self.ws.frame_read(sock)
807 self.check_frame(frame, True, self.ws.OP_TEXT, 'fragment1fragment2')
811 self.ws.frame_write(
812 sock, self.ws.OP_CONT, 'non-continuation payload', fin=True
814 self.ws.frame_write(sock, self.ws.OP_TEXT, 'Hello, world!', fin=True)
819 _, sock, _ = self.ws.upgrade()
821 self.ws.frame_write(
822 sock, self.ws.OP_CONT, 'non-continuation payload', fin=True
824 self.ws.frame_write(sock, self.ws.OP_TEXT, 'Hello, world!', fin=True)
829 _, sock, _ = self.ws.upgrade()
831 self.ws.frame_write(
833 self.ws.OP_CONT,
838 self.ws.frame_write(
839 sock, self.ws.OP_TEXT, 'Hello, world!', fin=True, chopsize=1
845 _, sock, _ = self.ws.upgrade()
847 self.ws.frame_write(
848 sock, self.ws.OP_CONT, 'non-continuation payload', fin=False
850 self.ws.frame_write(sock, self.ws.OP_TEXT, 'Hello, world!', fin=True)
855 _, sock, _ = self.ws.upgrade()
857 self.ws.frame_write(
858 sock, self.ws.OP_CONT, 'non-continuation payload', fin=False
860 self.ws.frame_write(sock, self.ws.OP_TEXT, 'Hello, world!', fin=True)
865 _, sock, _ = self.ws.upgrade()
867 self.ws.frame_write(
869 self.ws.OP_CONT,
874 self.ws.frame_write(
875 sock, self.ws.OP_TEXT, 'Hello, world!', fin=True, chopsize=1
881 _, sock, _ = self.ws.upgrade()
883 self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment1', fin=False)
884 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment2', fin=True)
885 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment3', fin=False)
886 self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment4', fin=True)
888 frame = self.ws.frame_read(sock)
890 if frame['opcode'] == self.ws.OP_TEXT:
891 self.check_frame(frame, True, self.ws.OP_TEXT, 'fragment1fragment2')
898 _, sock, _ = self.ws.upgrade()
901 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment1', fin=False)
902 self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment2', fin=False)
903 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment3', fin=True)
908 _, sock, _ = self.ws.upgrade()
911 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment1', fin=True)
912 self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment2', fin=False)
913 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment3', fin=True)
918 _, sock, _ = self.ws.upgrade()
920 self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment1', fin=False)
921 self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment2')
926 _, sock, _ = self.ws.upgrade()
928 self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment1', fin=False)
929 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment2', fin=False)
930 self.ws.frame_write(sock, self.ws.OP_PING, 'pongme 1!')
934 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment3', fin=False)
935 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment4', fin=False)
936 self.ws.frame_write(sock, self.ws.OP_PING, 'pongme 2!')
937 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment5')
939 frame = self.ws.frame_read(sock)
940 self.check_frame(frame, True, self.ws.OP_PONG, 'pongme 1!')
942 frame = self.ws.frame_read(sock)
943 self.check_frame(frame, True, self.ws.OP_PONG, 'pongme 2!')
946 self.ws.frame_read(sock),
948 self.ws.OP_TEXT,
954 self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment1', fin=False)
955 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment2', fin=False)
956 self.ws.frame_write(sock, self.ws.OP_PING, 'pongme 1!')
958 frame = self.ws.frame_read(sock)
959 self.check_frame(frame, True, self.ws.OP_PONG, 'pongme 1!')
963 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment3', fin=False)
964 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment4', fin=False)
965 self.ws.frame_write(sock, self.ws.OP_PING, 'pongme 2!')
967 frame = self.ws.frame_read(sock)
968 self.check_frame(frame, True, self.ws.OP_PONG, 'pongme 2!')
971 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment5')
974 self.ws.frame_read(sock),
976 self.ws.OP_TEXT,
987 _, sock, _ = self.ws.upgrade()
989 self.ws.frame_write(sock, self.ws.OP_TEXT, '')
990 frame = self.ws.frame_read(sock)
991 self.check_frame(frame, True, self.ws.OP_TEXT, '')
995 self.ws.frame_write(sock, self.ws.OP_TEXT, '', fin=False)
996 self.ws.frame_write(sock, self.ws.OP_CONT, '', fin=False)
997 self.ws.frame_write(sock, self.ws.OP_CONT, '')
999 frame = self.ws.frame_read(sock)
1000 self.check_frame(frame, True, self.ws.OP_TEXT, '')
1006 self.ws.frame_write(sock, self.ws.OP_TEXT, '', fin=False)
1007 self.ws.frame_write(sock, self.ws.OP_CONT, payload, fin=False)
1008 self.ws.frame_write(sock, self.ws.OP_CONT, '')
1010 frame = self.ws.frame_read(sock)
1011 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
1017 self.ws.frame_write(sock, self.ws.OP_TEXT, payload)
1019 frame = self.ws.frame_read(sock)
1020 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
1024 self.ws.frame_write(sock, self.ws.OP_TEXT, payload[:12], fin=False)
1025 self.ws.frame_write(sock, self.ws.OP_CONT, payload[12:])
1027 frame = self.ws.frame_read(sock)
1028 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
1032 self.ws.message(sock, self.ws.OP_TEXT, payload, fragmention_size=1)
1034 frame = self.ws.frame_read(sock)
1035 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
1041 self.ws.message(sock, self.ws.OP_TEXT, payload, fragmention_size=1)
1043 frame = self.ws.frame_read(sock)
1044 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
1075 _, sock, _ = self.ws.upgrade()
1079 self.ws.frame_write(sock, self.ws.OP_TEXT, payload)
1081 frame = self.ws.frame_read(sock)
1082 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
1088 _, sock, _ = self.ws.upgrade()
1090 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1091 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1097 _, sock, _ = self.ws.upgrade()
1099 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1102 self.ws.frame_write(sock, self.ws.OP_PING, '')
1109 _, sock, _ = self.ws.upgrade()
1111 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1114 self.ws.frame_write(sock, self.ws.OP_TEXT, payload)
1121 _, sock, _ = self.ws.upgrade()
1123 self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment1', fin=False)
1124 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1127 self.ws.frame_write(sock, self.ws.OP_CONT, 'fragment2')
1134 _, sock, _ = self.ws.upgrade()
1136 self.ws.frame_write(sock, self.ws.OP_TEXT, 'BAsd7&jh23' * 26 * 2**10)
1137 self.ws.frame_write(sock, self.ws.OP_TEXT, payload)
1138 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1142 self.ws.frame_write(sock, self.ws.OP_PING, '')
1149 _, sock, _ = self.ws.upgrade()
1151 self.ws.frame_write(sock, self.ws.OP_CLOSE, '')
1156 _, sock, _ = self.ws.upgrade()
1158 self.ws.frame_write(sock, self.ws.OP_CLOSE, 'a')
1163 _, sock, _ = self.ws.upgrade()
1165 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
1170 _, sock, _ = self.ws.upgrade()
1172 payload = self.ws.serialize_close(reason='Hello World!')
1174 self.ws.frame_write(sock, self.ws.OP_CLOSE, payload)
1179 _, sock, _ = self.ws.upgrade()
1181 payload = self.ws.serialize_close(reason='*' * 123)
1183 self.ws.frame_write(sock, self.ws.OP_CLOSE, payload)
1188 _, sock, _ = self.ws.upgrade()
1190 payload = self.ws.serialize_close(reason='*' * 124)
1192 self.ws.frame_write(sock, self.ws.OP_CLOSE, payload)
1227 _, sock, _ = self.ws.upgrade()
1229 payload = self.ws.serialize_close(code=code)
1231 self.ws.frame_write(sock, self.ws.OP_CLOSE, payload)
1235 _, sock, _ = self.ws.upgrade()
1237 payload = self.ws.serialize_close(code=code)
1239 self.ws.frame_write(sock, self.ws.OP_CLOSE, payload)
1247 _, sock, _ = self.ws.upgrade()
1249 payload = self.ws.serialize_close(code=5000)
1251 self.ws.frame_write(sock, self.ws.OP_CLOSE, payload)
1256 _, sock, _ = self.ws.upgrade()
1260 self.ws.frame_write(sock, self.ws.OP_CLOSE, payload)
1281 _, sock, _ = self.ws.upgrade()
1283 op_text = self.ws.OP_TEXT
1284 op_binary = self.ws.OP_BINARY
1287 if opcode == self.ws.OP_TEXT:
1292 self.ws.frame_write(sock, opcode, payload, chopsize=chopsize)
1293 frame = self.ws.frame_read(sock, read_timeout=5)
1297 if opcode == self.ws.OP_TEXT:
1302 self.ws.message(sock, opcode, payload, fragmention_size=f_size)
1303 frame = self.ws.frame_read(sock, read_timeout=5)
1360 _, sock, _ = self.ws.upgrade()
1364 self.ws.message(sock, self.ws.OP_TEXT, payload, fragmention_size=1300)
1366 frame = self.ws.frame_read(sock)
1367 self.check_frame(frame, True, self.ws.OP_TEXT, payload)
1380 _, sock, _ = self.ws.upgrade()
1383 opcode = self.ws.OP_TEXT
1385 self.ws.frame_write(sock, opcode, payload) # frame length is 100
1387 frame = self.ws.frame_read(sock)
1392 self.ws.frame_write(sock, opcode, payload) # frame length is 101
1402 _, sock, _ = self.ws.upgrade()
1404 frame = self.ws.frame_to_send(self.ws.OP_TEXT, 'blah')
1418 _, sock, _ = self.ws.upgrade()
1420 frame = self.ws.frame_to_send(self.ws.OP_TEXT, 'blah')
1425 frame = self.ws.frame_read(sock)
1426 self.check_frame(frame, True, self.ws.OP_PING, '') # PING frame