<node name="enable_server_socket" channel="inline" format="activate/enable" model="">
    <node name="channel" channel="inline" format="meta/channel" model="socket"/>
    <node name="port" channel="inline" format="number/integer" model="1971"/>
    <node name="handler" channel="inline" format="text/cybol-path" model=".logic.handle.enable"/>
</node>

<!--
    Complete socket example with operations: enable, open, sense, identify, close.
-->
<!--
    File "startup.cybol".
-->
<node name="enable_requests" channel="inline" format="activate/enable" model="">
    <node name="channel" channel="inline" format="meta/channel" model="socket"/>
    <node name="port" channel="inline" format="number/integer" model="1971"/>
    <node name="handler" channel="inline" format="text/cybol-path" model=".logic.handle.enable"/>
</node>
<!--
    File "enable.cybol".
    This is the enable handler file belonging to the above call of ".logic.handle.enable".
-->
<node name="open_client" channel="inline" format="dispatch/open" model="">
    <node name="channel" channel="inline" format="meta/channel" model="socket"/>
    <!-- Open client device in SERVER mode. It was already pre-configured inside by the accepting server socket. -->
    <node name="server" channel="inline" format="logicvalue/boolean" model="true"/>
    <node name="port" channel="inline" format="number/integer" model="1971"/>
    <node name="identification" channel="inline" format="text/cybol-path" model=".var.client_socket"/>
</node>
<node name="sense_client_data" channel="inline" format="feel/sense" model="">
    <node name="channel" channel="inline" format="meta/channel" model="socket"/>
    <node name="server" channel="inline" format="logicvalue/boolean" model="true"/>
    <node name="port" channel="inline" format="number/integer" model="1971"/>
    <node name="sender" channel="inline" format="text/cybol-path" model=".var.client_socket"/>
    <node name="language" channel="inline" format="meta/language" model="message/http-request"/>
    <!-- This is the callback function executed when the client sends data. -->
    <node name="handler" channel="inline" format="text/cybol-path" model=".logic.handle.sense"/>
    <!-- This is the callback function executed when the client does not respond and is to be closed. -->
    <node name="closer" channel="inline" format="text/cybol-path" model=".logic.handle.close"/>
</node>
<!-- File "sense.cybol" with processing instruction is left out here. -->
<!--
    File "close.cybol".
    This is the close handler file belonging to the above call of ".logic.handle.close".
-->
<!-- Get client belonging to the handler that was placed into the interrupt pipe. -->
<node name="get_client_id" channel="inline" format="communicate/identify" model="">
    <node name="identification" channel="inline" format="text/cybol-path" model=".var.client_socket"/>
</node>
<node name="handle_close" channel="inline" format="dispatch/close" model="">
    <node name="channel" channel="inline" format="meta/channel" model="socket"/>
    <node name="server" channel="inline" format="logicvalue/boolean" model="true"/>
    <node name="port" channel="inline" format="number/integer" model="1971"/>
    <node name="identification" channel="inline" format="text/cybol-path" model=".var.client_socket"/>
</node>

<!-- Fill internal input buffer of the corresponding windows with received events. -->
<node name="enable_display_server" channel="inline" format="activate/enable" model="">
    <node name="channel" channel="inline" format="meta/channel" model="display"/>
</node>

<node name="enable_display_server_and_add_general_handler" channel="inline" format="activate/enable" model="">
    <node name="channel" channel="inline" format="meta/channel" model="display"/>
    <!--
        For standard window event processing, use operation "feel/sense"
        which allows to hand over a SPECIFIC handler for each window.
        However, it is possible to assign another callback function here,
        which is OPTIONAL and would be executed upon arrival of EACH event,
        independently of any window.
    -->
    <node name="handler" channel="inline" format="text/cybol-path" model=".handle_each_event"/>
</node>

<!--
    Complete display example with operations: enable, sense, identify, receive.
    The "maintain/startup" and "dispatch/open" operations are assumed to have been called before.
-->
<node name="enable_server" channel="inline" format="activate/enable" model="">
    <node name="channel" channel="inline" format="meta/channel" model="display"/>
</node>
<node name="sense_client_window_events" channel="inline" format="feel/sense" model="">
    <node name="channel" channel="inline" format="meta/channel" model="display"/>
    <node name="server" channel="inline" format="logicvalue/boolean" model="true"/>
    <node name="sender" channel="inline" format="text/cybol-path" model=".gui.window_id"/>
    <node name="handler" channel="inline" format="text/cybol-path" model=".logic.handle"/>
</node>
<!--
    File "handle.cybol".
    This is the event handler file belonging to the above call of ".logic.handle".
-->
<!-- Get window client belonging to the handler that was placed into the interrupt pipe. -->
<node name="get_window_id" channel="inline" format="communicate/identify" model="">
     <node name="identification" channel="inline" format="text/cybol-path" model=".gui.window_id"/>
</node>
<!-- The element hierarchy of the window given as "medium" gets searched through to identify a suitable action. -->
<node name="receive_next_event" channel="inline" format="communicate/receive" model="">
    <node name="channel" channel="inline" format="meta/channel" model="display"/>
    <node name="server" channel="inline" format="logicvalue/boolean" model="true"/>
    <node name="sender" channel="inline" format="text/cybol-path" model=".gui.window_id"/>
    <node name="language" channel="inline" format="meta/language" model="message/gui-request">
        <node name="medium" channel="inline" format="text/cybol-path" model=".gui.window"/>
    </node>
    <node name="format" channel="inline" format="meta/format" model="text/plain"/>
    <node name="message" channel="inline" format="text/cybol-path" model=".gui.action"/>
    <!-- Read indirectly from internal buffer into which data have been written by activate/enable. -->
    <node name="asynchronicity" channel="inline" format="logicvalue/boolean" model="true"/>
</node>