Network Framer Library
Project description
The TCP network protocol provides a bidirectional stream of data between two network applications, but it turns out that most protocols do not use the communication link as a stream. In most network protocols, the stream is chopped up into individual units. The name given to these units varies by protocol: some call it a packet; in others, it’s a record; and many protocols actually use plain text, separating the units with carriage return/newline pairs. Regardless of the name, however, the vast majority of protocols impose some sort of separation onto the stream of data and only deal in whole units.
The Framer library is a network communications library, built on top of asyncio, for managing these units, which it calls frames. The Framer library is built as an asyncio protocol which also happens to implement the behavior of an asyncio transport. The protocol object can have framers set on both directions of the communication; these framers translate between the stream interface provided by TCP and the sequence of frames desired by the application.
A framer is simply an object implementing a couple of methods which implement the transformation from a stream to a frame and from a frame to a sequence of bytes to transmit on the stream. These framers can range from rather trivial–as in a text-oriented protocol like SMTP–all the way to a complex binary data transmission protocol such as some forms of RPC.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file framer-0.1.1.tar.gz
.
File metadata
- Download URL: framer-0.1.1.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3177d933c8cb086b0cfda00e7da9c5f8f08e0689a0d5b5fbedb93c86af708d22 |
|
MD5 | 74c827483dbc246c95c534cb908e7f43 |
|
BLAKE2b-256 | 1911b551fe240404fa52f2813a1e28210076acf5243079edb3efefa2fd2fb711 |