WebSocket API - server initiated close

Hi,

If a client app connects to a server through WebSocket API, and server
sends a close frame, how is the client app notified? Does the client
stack automatically respond with a close frame, then raise a "close"
event?

Meanwhile, if the client app is invoking send() while the server close
frame arrives, what happens? The paragraph about "bufferedAmount"
implies that send() won't fail, is that correct?

Thanks,
Zhong Yu

Received on Friday, 15 March 2013 13:56:33 UTC