Lines Matching refs:ABNF
268 def send(self, payload, opcode=ABNF.OPCODE_TEXT):
282 frame = ABNF.create_frame(payload, opcode)
317 return self.send(payload, ABNF.OPCODE_BINARY)
330 self.send(payload, ABNF.OPCODE_PING)
343 self.send(payload, ABNF.OPCODE_PONG)
355 if opcode == ABNF.OPCODE_TEXT:
357 elif opcode == ABNF.OPCODE_TEXT or opcode == ABNF.OPCODE_BINARY:
405 elif frame.opcode in (ABNF.OPCODE_TEXT, ABNF.OPCODE_BINARY, ABNF.OPCODE_CONT):
412 elif frame.opcode == ABNF.OPCODE_CLOSE:
415 elif frame.opcode == ABNF.OPCODE_PING:
423 elif frame.opcode == ABNF.OPCODE_PONG:
448 if status < 0 or status >= ABNF.LENGTH_16:
451 self.send(struct.pack('!H', status) + reason, ABNF.OPCODE_CLOSE)
468 if status < 0 or status >= ABNF.LENGTH_16:
473 self.send(struct.pack('!H', status) + reason, ABNF.OPCODE_CLOSE)
480 if frame.opcode != ABNF.OPCODE_CLOSE: