enum Request = open | close
abstract WebSocket
xor request -> Request ?
success
failure
xor states
initial ready
[ initially no request ]
opened
[ initially no request ]
closed --> closed
[ no request ]
failed --> failed
[ no request ]
webSocketOpenedClosed : WebSocket
[ ready --> request = open && request.success --> opened -->> request = close && request.success --> closed --> closed ]
WebSocket1
states
ready
WebSocket2
request -> open
success
states
ready
WebSocket3
states
opened
WebSocket4
request -> close
success
states
opened
WebSocket5
states
closed
WebSocket6
states
closed
webSocketOpenedFailed : WebSocket
[ ready --> request = open && request.success --> opened -->> request = close && request.failure --> failed --> failed ]
WebSocket7
states
ready
WebSocket8
request -> open
success
states
ready
WebSocket9
states
opened
WebSocket10
request -> close
failed
states
opened
WebSocket11
states
failed
WebSocket12
states
failed
webSocketFailed : WebSocket
[ ready --> request = open && request.failure --> failed --> failed ]