thana
05/06/2022, 6:59 AMreceiveDeserialized
on the DefaultClientWebSocketSession
but sooner or later this will inevitably result in an exception: as soon a Ping or a Close frame arrives this fails.
Wouldn;t you actually need something like frame.readDeserialiing()
or similar, so you could write something like
for(frame in incoming){
when(frame.frameType) {
FrameType.TEXT -> frame.readDeserialzied()
FrameType.CLOSE -> return;
}
}
?e5l
05/06/2022, 7:00 AMPING
or Close
in the default client session. They are handled automaticallythana
05/06/2022, 7:06 AMConverter doesn't support frame type CLOSE
e5l
05/06/2022, 7:07 AMthana
05/06/2022, 7:07 AMwhile(true){receiveDeserialized()}
and true
is jjust a bad choice for rhe loop 😄e5l
05/06/2022, 7:08 AMCLOSE
frames should be filtered out any waythana
05/06/2022, 7:12 AMAleksei Tirman [JB]
05/06/2022, 10:13 AMreceiveDeserialized
in a way that it shouldn’t receive a frame, otherwise responsibilities for receiving and deserialization are mixed in this method and that leads to the problem you described.