MCPcopy
hub / github.com/GoSecure/pyrdp / writeChannelJoinConfirm

Method writeChannelJoinConfirm

pyrdp/parser/mcs.py:364–376  ·  view source on GitHub ↗

Encode a Channel Join Confirm PDU :param stream: The destination stream to write into. :param pdu: the confirmation PDU.

(self, stream: BytesIO, pdu: MCSChannelJoinConfirmPDU)

Source from the content-addressed store, hash-verified

362 stream.write(pdu.payload)
363
364 def writeChannelJoinConfirm(self, stream: BytesIO, pdu: MCSChannelJoinConfirmPDU):
365 """
366 Encode a Channel Join Confirm PDU
367 :param stream: The destination stream to write into.
368 :param pdu: the confirmation PDU.
369 """
370 stream.write(per.writeEnumeration(pdu.result))
371 stream.write(Uint16BE.pack(pdu.initiator - MCSChannelID.USERCHANNEL_BASE))
372 stream.write(Uint16BE.pack(pdu.requested))
373
374 if pdu.channelID is not None:
375 stream.write(Uint16BE.pack(pdu.channelID))
376 stream.write(pdu.payload)
377
378 def writeDataPDU(self, stream: BytesIO, pdu: Union[MCSSendDataRequestPDU, MCSSendDataIndicationPDU]):
379 """

Callers

nothing calls this directly

Calls 2

packMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected