bufsock.py 1.1
Sponsored Links
bufsock.py 1.1 Ranking & Summary
File size:
0.002 MB
Platform:
Any Platform
License:
GPL (GNU General Public License)
Price:
Downloads:
1270
Date added:
2006-05-02
Publisher:
Dan Stromberg
bufsock.py 1.1 description
bufsock.py is a python module that makes it a little bit easier to work with sockets, and may also make your I/O faster if youre reading and/or writing lots of tiny packets.
Also, you may find that it makes your network applications more reliable, as the network is allowed to split apart your packets into multiple smaller packets, or aggregate two or more packets into one larger packet, if it decides it needs to do so for reliability or performance.
So you might do a s.recv expecting to get one line of input, but the network decided to batch together two remote s.sends into one s.recv, for example. But the network usually, but not always, will batch up your packets the way youd expect - so this can be a difficult problem to track down.
It supports the following methods:
read(length) brings in a specific number of bytes.
readto(char) reads up thru the next occurence of char
readtomax(char,length) reads up thru the next occurence of char, or length bytes, whichever is less
set_chunk_len(length) says "do reads and writes in increments of length". The chunk length defaults to 4096. You should make this larger on networks that employ jumbo frames to squeeze out more performance!
send(buf) writes the bytes in buf.
flush() is just like stdios (the C librarys) flush function. Call it when you want an output buffer flushed (written immediately).
shutdown(v) just like for a regular socket, except it flushes first.
Usage:
Code snippet:
sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock.connect((hostname,port))
bs = bufsock.bufsock(sock)
version = bs.readto(n)
print version
Also, you may find that it makes your network applications more reliable, as the network is allowed to split apart your packets into multiple smaller packets, or aggregate two or more packets into one larger packet, if it decides it needs to do so for reliability or performance.
So you might do a s.recv expecting to get one line of input, but the network decided to batch together two remote s.sends into one s.recv, for example. But the network usually, but not always, will batch up your packets the way youd expect - so this can be a difficult problem to track down.
It supports the following methods:
read(length) brings in a specific number of bytes.
readto(char) reads up thru the next occurence of char
readtomax(char,length) reads up thru the next occurence of char, or length bytes, whichever is less
set_chunk_len(length) says "do reads and writes in increments of length". The chunk length defaults to 4096. You should make this larger on networks that employ jumbo frames to squeeze out more performance!
send(buf) writes the bytes in buf.
flush() is just like stdios (the C librarys) flush function. Call it when you want an output buffer flushed (written immediately).
shutdown(v) just like for a regular socket, except it flushes first.
Usage:
Code snippet:
sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock.connect((hostname,port))
bs = bufsock.bufsock(sock)
version = bs.readto(n)
print version
bufsock.py 1.1 Screenshot
bufsock.py 1.1 Keywords
Little Bit Easier
to work
python module
Little Bit
easier to
Bit Easier
bufsock.py
packets
length
makes
python
sockets
bufsock.py 1.1
Networking
System
Bookmark bufsock.py 1.1
bufsock.py 1.1 Copyright
WareSeeker periodically updates pricing and software information of bufsock.py 1.1 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of bufsock.py 1.1 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
things get a little bit easier
someday things will get a little bit easier
making life a little bit easier
child things are gonna get a little bit easier
lyrics of forget about me by little bit
python module that measures code
things get a little bit easier once you understand
python modules
little bit lyrics
things will get a little bit easier lyrics
forget about me lyrics by little bit
python module that allows
little bit longer jonas brothers
little bit of life
things are going to get a little bit easier
just a little bit
little bitty pretty one
python module path
Related Software
Scapy is a powerful interactive packet manipulation tool, packet generator, network scanner, network discovery tool. Free Download
ID3.py is an object-oriented Python module for manipulating the so-called ID3 informational tags on MP3 files. Free Download
PyVISA is a Python package which provides support for the Virtual Instrument Software Architecture. Free Download
seimsic-py is a Python module for parsing and decoding SEG-Y seimsic data. Free Download
QWPython is a Python-powered QuakeWorld server. Free Download
C++ Sockets is a C++ wrapper for BSD-style sockets. Free Download
discord project is a Python module for converting dates from Gregorian to Discordian. Free Download
Pydiction offers you a powerful and very useful utility which allows you to Tab-complete Python code in Vim, including: standard, custom and third-party modules and packages. Free Download
Latest Software
Popular Software
Favourite Software