1 #ifndef _CONCURRENTLINKEDLISTQUEUE_HPP__
2 #define _CONCURRENTLINKEDLISTQUEUE_HPP__
6 #include "IoTRMIUtil.hpp"
8 /** Class ConcurrentLinkedListQueue is a queue that can handle
9 * concurrent requests and packets for IoT communication via socket.
11 * It stores object through a char pointer.
13 * @author Rahmadi Trimananda <rtrimana @ uci.edu>
30 Node(char* val, int len);
35 void setNext(Node* nxt);
40 class ConcurrentLinkedListQueue {
47 ConcurrentLinkedListQueue();
48 ~ConcurrentLinkedListQueue();
49 void enqueue(char* value, int length); // Enqueue to tail
50 char* dequeue(); // Dequeue from tail
51 char* deQAndGetLength(int* length); // Dequeue from tail and return length