mcp-cord #302

Parent #354Owner #29Flags readSource hellcore/hellcore.db

Aliases: mcp-cord, cord

9 verbs · 17 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
next_idthis none thisrxd#3025
cord_sendthis none thisrxd#3028
cord_closedthis none thisrxd#3023
handle_this none thisrxd#3024
handle_closedthis none thisrxd#3024
find_typethis none thisrxd#3027
send_openthis none thisrxd#3023
finalize_connectionthis none thisrxd#3029
type_namethis none thisrxd#3027

Properties

PropertyDefinerFlagsOwnerValue
next_id#302r#291
cords#302r#29{}
registry_ids#302rc#29{}
version_range#354r#29<clear>
cord_types#354r#29{}
messages_in#355r#29{{"open", {"_id", "_type"}}, {"", {"_id", "_message"}}, {"closed", {"_id"}}}
messages_out#355r#29{{"open", {"_id", "_type"}}, {"", {"_id", "_message"}}, {"closed", {"_id"}}}
aliases#1rc#29{"mcp-cord", "cord"}
description#1rc#29<clear>
object_size#1r#29{4736, 1298434454}
hidden_verbs#1rc#29<clear>
phelp_msg#1rc#29<clear>
weight#1rc#29<clear>
owner_verbs#1rc#29<clear>
plural_name#1rc#29<clear>
client_image#1rc#29<clear>
listening#1rc#29<clear>

Ancestry

Ancestors (nearest first): #354 generic MCP package#355 generic message dispatch object#1 root

Children: none

Call graph

calls n302_5 #302:find_type n45_23 #45:leaves n302_5->n45_23 n302_7 #302:finalize_connection n57_1 #57:_recycle n302_7->n57_1 n302_8 #302:type_name n301_12 #301:package_name n302_8->n301_12

Source

next_id

Spec this none thisFlags rxdOwner #29Definer #302

Referenced by

none

Source

1if (caller == this)
2return tostr("I", this.next_id = this.next_id + 1);
3else
4raise(E_PERM);
5endif

cord_send

Spec this none thisFlags rxdOwner #29Definer #302

Referenced by

none

Source

1{message, alist} = args;
2cord = caller;
3session = cord.session;
4if (cord in $cord.registry)
5return this:send_(session, tostr(cord.id), message, @alist);
6else
7raise(E_PERM);
8endif

cord_closed

Spec this none thisFlags rxdOwner #29Definer #302

Referenced by

none

Source

1cord = caller;
2session = cord.session;
3this:send_closed(session, tostr(cord.id));

handle_

Spec this none thisFlags rxdOwner #29Definer #302

Referenced by

none

Source

1{session, id, message, @assocs} = args;
2if (caller == this)
3$cord:mcp_receive(id, message, assocs);
4endif

handle_closed

Spec this none thisFlags rxdOwner #29Definer #302

Referenced by

none

Source

1{session, id, @rest} = args;
2if (caller == this)
3$cord:mcp_closed(id);
4endif

find_type

Spec this none thisFlags rxdOwner #29Definer #302

Referenced by

none

Source

1{name} = args;
2for i in ($object_utils:leaves($cord.type_root))
3if (name == (($mcp.registry:package_name(i.parent_package) + "-") + i.cord_name))
4return i;
5endif
6endfor
7return $failed_Match;

send_open

Spec this none thisFlags rxdOwner #29Definer #302

Referenced by

none

Source

1if (caller == $cord)
2return pass(@args);
3endif

finalize_connection

Spec this none thisFlags rxdOwner #29Definer #302

Referenced by

none

Source

1session = caller;
2len = length($cord.registry_ids);
3for i in [0..len - 1]
4idx = len - i;
5cord = $cord.registry[idx];
6if (cord.session == session)
7$recycler:_recycle(cord);
8endif
9endfor

type_name

Spec this none thisFlags rxdOwner #29Definer #302

Referenced by

none

Source

1{cord_type} = args;
2parent = $mcp:package_name(cord_type.parent_package);
3if (suffix = cord_type.cord_name)
4return (parent + "-") + suffix;
5else
6return parent;
7endif