50 const DefaultQueuePollingInterval = 250ms;
94 send(hash<SseMessageInfo> msg);
this class represents a connection to an HTTP client
Definition ServerSentEventConnection.qc.dox.h:37
connectionClosed()
This method is called when the connection is closed.
*string pollData()
This method is called to poll for messages from the client to send from the server.
sendEncoded(string msg)
Pushes an already-encoded message on the connection's message queue.
stop()
force closing socket related to connection
string cid
The connection ID.
Definition ServerSentEventConnection.qc.dox.h:44
flush()
Flush all output data.
*string pollDataImmediate()
This method is called to poll for messages from the client to send from the server.
Qore::Thread::Queue queue()
the Queue object stores messages to be sent to the server
int tid
The TID of the I/O thread.
Definition ServerSentEventConnection.qc.dox.h:57
send(hash< SseMessageInfo > msg)
Pushes an unencoded message on the connection's message queue.
ServerSentEventHandler handler
The parent handler object.
Definition ServerSentEventConnection.qc.dox.h:41
bool stop_flag
Stop connection flag.
Definition ServerSentEventConnection.qc.dox.h:47
Socket sock
The socket used by the server for this connection.
Definition ServerSentEventConnection.qc.dox.h:63
registered()
Called when the connection has been registered in handler and accept sending messages.
constructor(ServerSentEventHandler handler, Socket sock, string cid)
the constructor is called when a new connection is made by an HTTP client
the ServerSentEventHandler namespace contains all the objects in the ServerSentEventHandler module
Definition ServerSentEventConnection.qc.dox.h:26