handleMSG_DISCONNECT method

void handleMSG_DISCONNECT(
  1. MSG_DISCONNECT msg
)

The recipient MUST NOT accept any data after receiving MSG_DISCONNECT.

Implementation

void handleMSG_DISCONNECT(MSG_DISCONNECT msg) {
  if (tracePrint != null) {
    tracePrint(
        '$hostport: MSG_DISCONNECT ${msg.reasonCode} ${msg.description}');
  }
  if (server) {
    disconnect('MSG_DISCONNECT ${msg.reasonCode} ${msg.description}');
  }
}