12 #ifndef __NET_WEBSOCKETSET_H__
13 #define __NET_WEBSOCKETSET_H__
38 friend class NET_WebSocketItem;
83 os <<
"CONNECT ERROR";
88 case DISCONNECT_ERROR:
89 os <<
"DISCONNECT ERROR";
94 case MESSAGE_SEND_ERROR:
95 os <<
"MESSAGE SEND ERROR";
97 case MESSAGE_RECEIVED:
98 os <<
"MESSAGE RECEIVED";
100 case MESSAGE_RECEIVE_ERROR:
101 os <<
"MESSAGE RECEIVE ERROR";
142 const std::chrono::milliseconds&
timeout);
152 bool getNextEvent(
Event& ev,
const std::chrono::milliseconds&
timeout);
161 void disconnectAll();
190 NET_WebSocketSet::Item* ws,
216 #endif // __NET_WEBSOCKETSET_H__
Event(const Type &type, const UT_StringHolder &id, const NET_Time &t)
UT_StringHolder myId
The connection id the event originated from.
friend std::ostream & operator<<(std::ostream &os, const Event ev)
UT_StringHolder toString(unsigned format=FormattingOptions::None) const
Describes an event that has occured.
UT_StringHolder toUTCString() const
virtual void onEvent(const Event &ev)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Class used for web socket operations.
GLsizei GLenum GLuint GLuint GLsizei GLchar * message
UT_StringHolder myMessage
The message for the event. In the case of a message event this is the read in event. In all other cases this describes the details of the event in English.
GLuint GLuint GLsizei GLenum type
UT_StringHolder myError
The error message if this is an error that occured.
Type myType
The type of event that occured.
GLbitfield GLuint64 timeout
UT_Url myUrl
The url that the event originated from.
NET_Time myTimestamp
The time at which the event occured.