File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -478,6 +478,14 @@ bool WebSocketsClient::isConnected(void) {
478478 return (_client.status == WSC_CONNECTED);
479479}
480480
481+ /* *
482+ * RFC 6455
483+ * get the full URL/URI of the connection
484+ */
485+ String WebSocketsClient::getUrl (void ) {
486+ return ((_client.isSSL ) ? WEBSOCKETS_STRING (" wss://" ) : WEBSOCKETS_STRING (" ws://" )) + _host + " :" + String (_port) + _client.cUrl ;
487+ }
488+
481489// #################################################################################
482490// #################################################################################
483491// #################################################################################
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ class WebSocketsClient : protected WebSockets {
112112 void disableHeartbeat ();
113113
114114 bool isConnected (void );
115+ String getUrl (void );
115116
116117 protected:
117118 String _host;
You can’t perform that action at this time.
0 commit comments