Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Commit

Permalink
Added documentation for socket class and its constructor. (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
wrobell authored and djc committed Sep 13, 2016
1 parent 53424ab commit 9542b55
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion nnpy/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,21 @@
ustr = str if sys.version_info[0] > 2 else unicode

class Socket(object):

"""
Nanomsg scalability protocols (SP) socket.
.. seealso:: `nanomsg <http://nanomsg.org/v1.0.0/nanomsg.7.html>`_
"""
def __init__(self, domain, protocol):
"""
Create SP socket.
:param domain: Socket domain `AF_SP` or `AF_SP_RAW`.
:param protocol: Type of the socket determining its exact
semantics.
.. seealso:: `nn_socket <http://nanomsg.org/v1.0.0/nn_socket.3.html>`_
"""
self.sock = nanomsg.nn_socket(domain, protocol)

def close(self):
Expand Down

0 comments on commit 9542b55

Please sign in to comment.