def serialize(self): payload = str(self.chunk_id) payload += P.PAYLOAD_FIELD_SEPARATOR payload += str(self.total_chunks) payload += P.PAYLOAD_FIELD_SEPARATOR payload += self.chunk header = P.construct_header(P.DOCUMENT_DOWNLOAD, len(payload)) return header + payload
def serialize(self): payload = self.option payload += P.PAYLOAD_FIELD_SEPARATOR payload += str(self.row_start) payload += P.PAYLOAD_FIELD_SEPARATOR payload += str(self.row_end) payload += P.PAYLOAD_FIELD_SEPARATOR payload += self.text header = P.construct_header(P.UPDATE_TEXT, len(payload)) return header + payload
def serialize(self): payload = self.file_name header = P.construct_header(P.DOCUMENT_REQUEST, len(payload)) return header + payload
def serialize(self): payload = self.c_name header = P.construct_header(P.INTRODUCTION, len(payload)) return header + payload
def serialize(self): payload = str(self.response) header = P.construct_header(P.REQUEST_RESPONSE, len(payload)) return header + payload