56 const DefaultQueuePollingInterval = 250ms;
100 send(hash<SseMessageInfo> msg);
this class represents a connection to an HTTP client
Definition ServerSentEventConnection.qc.dox.h:37
hash< auto > cx
Original request context.
Definition ServerSentEventConnection.qc.dox.h:44
hash< auto > hdr
Original request header info.
Definition ServerSentEventConnection.qc.dox.h:47
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.
constructor(ServerSentEventHandler handler, Socket sock, hash< auto > cx, hash< auto > hdr, string cid)
the constructor is called when a new connection is made by an HTTP client
stop()
force closing socket related to connection
string cid
The connection ID.
Definition ServerSentEventConnection.qc.dox.h:50
flush()
Flush all output data.
*string pollDataImmediate()
This method is called to poll for messages to send to the client 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:63
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:53
Socket sock
The socket used by the server for this connection.
Definition ServerSentEventConnection.qc.dox.h:69
registered()
Called when the connection has been registered in handler and accept sending messages.
the ServerSentEventHandler namespace contains all the objects in the ServerSentEventHandler module
Definition ServerSentEventConnection.qc.dox.h:26