Communication method and communication device
The invention provides a communication method and a communication device, and belongs to the technical field of computers. The method comprises the steps of, when a first message is written into a message queue, according to a data volume of the first message, determining the number of data blocks,...
Gespeichert in:
Hauptverfasser: | , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention provides a communication method and a communication device, and belongs to the technical field of computers. The method comprises the steps of, when a first message is written into a message queue, according to a data volume of the first message, determining the number of data blocks, occupied by the first message, in the message queue; updating a write offset corresponding to the message queue to a sum of the write offset stored in the current corresponding message queue and the number, wherein the write offset is used for indicating a maximum index number of the data block which is currently written with data; according to the updated write offset and the number, determining the data blocks, occupied by the first message, in the message queue; and writing the first messageinto the determined data blocks. By adopting the communication method and device, the storage space can be saved.
本发明提供了种进行通信的方法和通信设备,属于计算机技术领域。所述方法包括:在将第消息写入消息队列时,根据所述第消息的数据量,确定所述第消息占用所述消息队列中数据块的数目;将所述消息队列对应的写偏移更新为当前对应所述消息队列 |
---|