From Ape Wiki
Contents |
[edit] Understanding pipe
Pipe is the main feature of APE's communication system. Pipes are communication conduits to exchange data between the Client and Server. There are two main types of pipes:
- Multi pipe or Channel
- Uni pipe or User
Each pipe is identified by a pubid (pseudo-random value generated by the Server, a 32 character key). The pubid is used when you exchange data with server to set on which pipe data is exchanged.
[edit] Channels
A channel is a communication conduit that can be directly created by the server or by a user. A channel is automatically created if a user subscribes to a non-existing channel. The APE Server answers directly while sending the pubid of the channel. (Allowing the user to communicate via the pipe of this channel).
Each channel has a list of properties, and by default the only property is the name of the channel. Properties can be added via server modules or authorised entities.
A channel has two ways of working :
- Interactive Channel
- Non-Interactive Channel
[edit] Interactive Channel
When a user subscribes to an already-existing interactive channel, he recieves the list of all the other users who have subscribed to this channel, and can directly communicate with them via the channel pipe.
[edit] Non-Interactive channel
The communication pipe of a non-interactive channel is read-only, meaning that users do not know each other, and can't communicate via the channel. Only authorized entities are allowed to do so.
A non-interactive channel is automaticaly created when the first character of its name is a wildcard (*)
[edit] Users
When a user connects to APE, a pipe is created to facilitate communication with other entities, and a unique sessid is assigned to the pipe. The sessid allows the Server to identify the user that sent each command.
As channels, a user has a list of properties, empty by default.
A user can perform actions (commands) that allow them, by default, to :
- Post a message on a pipe (channel or another user)
- Subscribe to a channel (also called 'join a channel')
- Unsubscribe a channel (also called 'leave a channel')
- Create a channel (If they subscribe to an non-existent channel)


