3.3.5.1 Connection Control Messages and Notifications

Connection control messages: Connection control messages are handled as follows:

MILCTRLCMD_OPENCONNECTION: The client MUST initialize the state necessary to process messages for this connection. This is the first message expected on a newly opened dynamic virtual channel.

MILCTRLCMD_CLOSECONNECTION: The dynamic virtual channel for this connection is about to be closed. The client MUST release all data structures associated with this connection. Any other messages received on this connection MUST be ignored.

MILCTRLCMD_VERSIONREQUEST: The server is requesting the list of supported protocol versions. The client MUST respond with a MILMSG_VERSIONREPLY message (section 2.2.9.3).

MILCTRLCMD_VERSIONANNOUNCEMENT: This message specifies the version that the server will use on this connection.

MILCTRLCMD_OPENCHANNEL, MILCTRLCMD_CLOSECHANNEL, and MILCTRLCMD_DATAONCHANNEL: These messages are used to open and close channels and to send data on channels within a connection. Section 3.3.5.1.1 describes these messages in more detail.

MILCTRLCMD_HANDLESURFACEMANAGEREVENT: This connection will render surfaces created by the [MS-RDPEDC] protocol.

Notifications: There are two types of notifications: connection notifications and channel notifications. Connection notifications are scoped to the entire connection and are sent using MILCTRLCMD_CONNECTIONNOTIFICATION. Channel notifications can be sent using MILCTRLCMD_CHANNELNOTIFICATION and MILCTRLCMD_CONNECTIONBROADCAST.

The MILCTRLCMD_CONNECTIONNOTIFICATION payload is a connection notification that can be one of the following:

MILMSG_VERSIONREPLY: The client MUST send this notification in response to a MILCTRLCMD_VERSIONREQUEST message.

MILMSG_CONNECTIONLOST: The client MUST send this notification when it is about to terminate a connection.

The MILCTRLCMD_CHANNELNOTIFICATION includes a channel notification payload that MAY be sent as a response to channel message. The channelHandle field of the message contains the originating channel. The notification can be any notification described in section 2.2.9. Applicable sending rules are described in section 3.3.5.