Multiplex
Location: programming\c++\cvs\polylib
Files: Multiplex.cpp - for all classes
Status: Initial design
This class combines multiple streams into one stream. Demultiplex can later be used to get the original streams back. In addition, streams are divided into packets. Data is seen only when the entire packet arrives. Packets are limited to 65535 Bytes.
Classes
- CMultiplex -
- CDemultiplex -
CMultiplex
Members
CStream *operator [](int StreamID);
SetSendCallback(Class,Function)
Packet format
| 1 Byte | 2 Bytes | 1 Byte | N Bytes(DataSize)
|
| Channel | DataSize | Reserved | Data
|
Data per stream
- Current stream ID (0 is reserved for multiplex controls)
- Number of bytes remaining to be read before next packet
- Packetnumber
- State of retreival
Copyright 2004 © Polyart. All rights reserved.