{"action":"created","issue":{"url":"https://api.github.com/repos/tonysimpson/nanomsg-python/issues/37","labels_url":"https://api.github.com/repos/tonysimpson/nanomsg-python/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/tonysimpson/nanomsg-python/issues/37/comments","events_url":"https://api.github.com/repos/tonysimpson/nanomsg-python/issues/37/events","html_url":"https://github.com/tonysimpson/nanomsg-python/issues/37","id":59067510,"number":37,"title":"nonblocking ?","user":{"login":"stuaxo","id":179677,"avatar_url":"https://avatars.githubusercontent.com/u/179677?v=3","gravatar_id":"","url":"https://api.github.com/users/stuaxo","html_url":"https://github.com/stuaxo","followers_url":"https://api.github.com/users/stuaxo/followers","following_url":"https://api.github.com/users/stuaxo/following{/other_user}","gists_url":"https://api.github.com/users/stuaxo/gists{/gist_id}","starred_url":"https://api.github.com/users/stuaxo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuaxo/subscriptions","organizations_url":"https://api.github.com/users/stuaxo/orgs","repos_url":"https://api.github.com/users/stuaxo/repos","events_url":"https://api.github.com/users/stuaxo/events{/privacy}","received_events_url":"https://api.github.com/users/stuaxo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-26T12:48:59Z","updated_at":"2015-04-13T19:28:03Z","closed_at":null,"body":"Hi,\r\n   Does this support nonblocking mode ?    I'm thinking of using PAIR with it ..\r\n\r\nS"},"comment":{"url":"https://api.github.com/repos/tonysimpson/nanomsg-python/issues/comments/92470265","html_url":"https://github.com/tonysimpson/nanomsg-python/issues/37#issuecomment-92470265","issue_url":"https://api.github.com/repos/tonysimpson/nanomsg-python/issues/37","id":92470265,"user":{"login":"vac","id":200544,"avatar_url":"https://avatars.githubusercontent.com/u/200544?v=3","gravatar_id":"","url":"https://api.github.com/users/vac","html_url":"https://github.com/vac","followers_url":"https://api.github.com/users/vac/followers","following_url":"https://api.github.com/users/vac/following{/other_user}","gists_url":"https://api.github.com/users/vac/gists{/gist_id}","starred_url":"https://api.github.com/users/vac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vac/subscriptions","organizations_url":"https://api.github.com/users/vac/orgs","repos_url":"https://api.github.com/users/vac/repos","events_url":"https://api.github.com/users/vac/events{/privacy}","received_events_url":"https://api.github.com/users/vac/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T19:28:03Z","updated_at":"2015-04-13T19:28:03Z","body":"I don't have much experience in using this library but making non-blocking BUS was not a problem!\r\nI think that in PAIR it would be the same:\r\n```python\r\n    data = your_socket.recv(flags=nanomsg.DONTWAIT)\r\n```\r\nThe only problem is that it raises exception instead of return None - so my code looks like this:\r\n```python\r\n    try:\r\n        data = your_socket.recv(flags=nanomsg.DONTWAIT)\r\n    except nanomsg.NanoMsgAPIError:\r\n        data=None\r\n```\r\nIf you want to detect proper exceptions that you have to check error codes of exception.\r\n"}}