handleMSG_CHANNEL_EOF method

void handleMSG_CHANNEL_EOF(
  1. MSG_CHANNEL_EOF msg
)

No explicit response is sent to this message. However, the application may send EOF to whatever is at the other end of the channel.

Implementation

void handleMSG_CHANNEL_EOF(MSG_CHANNEL_EOF msg) {
  if (tracePrint != null) {
    tracePrint('$hostport: MSG_CHANNEL_EOF ${msg.recipientChannel}');
  }
  Channel chan = channels[msg.recipientChannel];
  if (chan == null) {
    if (print != null) {
      print('$hostport: close invalid channel');
      return;
    }
  }
  if (!chan.sentEof) {
    chan.sentEof = true;
    writeCipher(MSG_CHANNEL_EOF(chan.remoteId));
  }
}