Manual Pages for UNIX Darwin command on man multiplexer
MyWebUniversity

Manual Pages for UNIX Darwin command on man multiplexer

multiplexer(n) One-to-many communication with sockets. multiplexer(n)

NAME

multiplexer - One-to-many communication with sockets.

SYNOPSIS

package require TTccll 88..22 package require llooggggeerr ::::mmuullttiipplleexxeerr::::ccrreeaattee

$${{mmuullttiipplleexxeerriinnssttaannccee}}::::IInniitt port

$${{mmuullttiipplleexxeerriinnssttaannccee}}::::CCoonnffiigg key value

$${{mmuullttiipplleexxeerriinnssttaannccee}}::::AAddddFFiilltteerr cmdprefix

ccmmddpprreeffiixx data chan clientaddress clientport

$${{mmuullttiipplleexxeerriinnssttaannccee}}::::AAddddAAcccceessssFFiilltteerr cmdprefix

ccmmddpprreeffiixx chan clientaddress clientport

$${{mmuullttiipplleexxeerriinnssttaannccee}}::::AAddddEExxiittFFiilltteerr cmdprefix

ccmmddpprreeffiixx chan clientaddress clientport

DESCRIPTION

The mmuullttiipplleexxeerr package provides a generic system for one-to-many com-

munication utilizing sockets. For example, think of a chat system where one user sends a message which is then broadcast to all the other connected users.

It is possible to have different multiplexers running concurrently.

::::mmuullttiipplleexxeerr::::ccrreeaattee

The ccrreeaattee command creates a new multiplexer 'instance'. For

example: This instance can then be manipulated like so:

$${{mmuullttiipplleexxeerriinnssttaannccee}}::::IInniitt port

This starts the multiplexer listening on the specified port.

$${{mmuullttiipplleexxeerriinnssttaannccee}}::::CCoonnffiigg key value

Use CCoonnffiigg to configure the multiplexer instance. Configuration

options currently include: sseennddttoooorriiggiinn A boolean flag. If ttrruuee, the sender will receive a copy of the sent message. Defaults to ffaallssee. ddeebbuugglleevveell

Sets the debug level to use for the multiplexer instance,

according to those specified by the llooggggeerr package (debug, info, notice, warn, error, critical).

$${{mmuullttiipplleexxeerriinnssttaannccee}}::::AAddddFFiilltteerr cmdprefix

Command to add a filter for data that passes through the multi-

plexer instance. The registered cmdprefix is called when data

arrives at a multiplexer instance. If there is more than one

filter command registered at the instance they will be called in the order of registristation, and each filter will get the result of the preceding filter as its argument. The first filter gets the incoming data as its argument. The result returned by the last filter is the data which will be broadcast to all

clients of the multiplexer instance. The command prefix is

called as ccmmddpprreeffiixx data chan clientaddress clientport Takes the incoming data, modifies it, and returns that as its result. The last three arguments contain information

about the client which sent the data to filter: The chan-

nel connecting us to the client, its ip-address, and its

ip-port.

$${{mmuullttiipplleexxeerriinnssttaannccee}}::::AAddddAAcccceessssFFiilltteerr cmdprefix

Command to add an access filter. The registered cmdprefix is called when a new client socket tries to connect to the multixer

instance. If there is more than one access filter command regis-

tered at the instance they will be called in the order of reg-

istristation. If any of the called commands returns -11 the

access to the multiplexer instance is denied and the client

channel is closed immediately. Any other result grants the

client access to the multiplexer instance. The command prefix

is called as ccmmddpprreeffiixx chan clientaddress clientport The arguments contain information about the client which

tries to connected to the instance: The channel connect-

ing us to the client, its ip-address, and its ip-port.

$${{mmuullttiipplleexxeerriinnssttaannccee}}::::AAddddEExxiittFFiilltteerr cmdprefix

Adds filter to be run when client socket generates an EOF condi-

tion. The registered cmdprefix is called when a client socket

of the multixer signals EOF. If there is more than one exit fil-

ter command registered at the instance they will be called in the order of registristation. Errors thrown by an exit filter are ignored, but logged. Any result returned by an exit filter is ignored. The command prefix is called as ccmmddpprreeffiixx chan clientaddress clientport The arguments contain information about the client which signaled the EOF: The channel connecting us to the

client, its ip-address, and its ip-port.

KKEEYYWWOORRDDSS

chat, multiplexer

multiplexer 0.2 multiplexer(n)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™