We have an application which internally makes use of chat. The socket object is created using the hostname from the url(https://myorgspace.com/myapp). The code is as follows