Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,22 @@ The following versions of Python are supported CPython 2.6+, 3.2+ and Pypy 2.1.0
Bugs and change requests can be made
[here](https://github.com/tonysimpson/nanomsg-python/issues).


nanommsg library in /usr/local
==============================


If you're nanomsg is in /usr/local and your machine is not configured to find it there you can rename the usr_local_setup.cfg to setup.cfg to fix the problem.
If your nanomsg is in /usr/local and your machine is not configured to find it there you can rename the usr_local_setup.cfg to setup.cfg to fix the problem.

Building and installing
=======================

**You need to build and install [nanomsg](http://nanomsg.org/) in order to use
these bindings.**

1. Linux
* `cd /path/to/nanomsg-python`
* `python setup.py build`
* `sudo python setup.py install`

Example
=======
Expand Down
4 changes: 2 additions & 2 deletions nanomsg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class Socket(object):

"""

_INT_PACKER = _Struct(str('l'))
_INT_PACKER = _Struct(str('i'))

class _Endpoint(object):
def __init__(self, socket, endpoint_id, address):
Expand Down Expand Up @@ -382,7 +382,7 @@ def get_int_option(self, level, option):
_nn_check_positive_rtn(rtn)
if length != size:
raise NanoMsgError(('Returned option size (%r) should be the same'
' as size of int (%r)') % (rtn, size))
' as size of int (%r)') % (length, size))
return Socket._INT_PACKER.unpack_from(buffer(buf))[0]

def get_string_option(self, level, option, max_len=16*1024):
Expand Down