Hi,
I am trying to use “wss” via roStreamSocket and nothing works for me
function listenSocket()
messagePort = CreateObject("roMessagePort")
sendAddress = CreateObject("roSocketAddress")
sendAddress.setHostName("adress.com") 'wss://adress.com
sendAddress.setPort(443)
m._socket = CreateObject("roStreamSocket")
m._socket.setMessagePort(messagePort)
m._socket.notifyReadable(true)
m._socket.notifyWritable(true)
m._socket.notifyException(true)
m._socket.setSendToAddress(sendAddress)
m._socket.setKeepAlive(true)
buffer = CreateObject("roByteArray")
buffer[1024] = 0
localStatus = m._socket.sendStr("subscription")
while True
event = wait(0, messagePort)
if type(event) = "roSocketEvent"
if event.getSocketID() = m._socket.getID() and m._socket.isReadable()
received = m._socket.receive(buffer, 0, 1024)
if received <> -1
print "WebSocket received data "
end if
end if
end if
end while
end function
localStatus = -1 for me
received = -1 for me
wss://adress.com - it is a fake address I have a real one
what am I doing wrong?
