Open Kizna1ver opened 4 years ago
You have missing msgType. Besides, could try use a object
imgMsg{msgid:string,msg: array}
//the array msg have all the message received in the same msgId.
//when msg.length=msg[0].msgLength,
//we could merge all the msg in imgMsg together to make a picture.
You have missing msgType. Besides, could try use a object
imgMsg{msgid:string,msg: array} //the array msg have all the message received in the same msgId. //when msg.length=msg[0].msgLength, //we could merge all the msg in imgMsg together to make a picture.
You're exactly right.
@buttering Maybe your voice transmission will use this slicing protocol also. #6
why design
Today I had a problem trying to send the base64 encoding of the image.When I tried to send a large image at once, the send failed. I tested that I could send a maximum of 1800 to 1900 characters at one time.So We're going to design a protocol for sharding to solve this problem.
Method
Change the message format to add fields to distinguish each piece of message. For example: { msgName:that.username, msgData:imgTag, msgId:
msgLength: imgSeq: } And I'm still thinking about it