From a8f07135482f2631c15a531d1d7dfce283afbf87 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 25 May 2014 22:56:45 +0300 Subject: [PATCH] socket: Add _GLOBAL_DEFAULT_TIMEOUT constant. --- socket/metadata.txt | 2 +- socket/setup.py | 2 +- socket/socket.py | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/socket/metadata.txt b/socket/metadata.txt index ee35c824..e3a264d3 100644 --- a/socket/metadata.txt +++ b/socket/metadata.txt @@ -1,4 +1,4 @@ srctype = micropython-lib type = module -version = 0.0.2 +version = 0.0.3 author = Paul Sokolovsky diff --git a/socket/setup.py b/socket/setup.py index eb187e37..82c63b84 100644 --- a/socket/setup.py +++ b/socket/setup.py @@ -6,7 +6,7 @@ from setuptools import setup setup(name='micropython-socket', - version='0.0.2', + version='0.0.3', description='socket module for MicroPython', long_description="This is a module reimplemented specifically for MicroPython standard library,\nwith efficient and lean design in mind. Note that this module is likely work\nin progress and likely supports just a subset of CPython's corresponding\nmodule. Please help with the development if you are interested in this\nmodule.", url='https://github.com/micropython/micropython/issues/405', diff --git a/socket/socket.py b/socket/socket.py index d5fec0a1..c4413e59 100644 --- a/socket/socket.py +++ b/socket/socket.py @@ -1,6 +1,9 @@ from microsocket import getaddrinfo import microsocket as _socket + +_GLOBAL_DEFAULT_TIMEOUT = 30 + def create_connection(addr, timeout=None, source_address=None): s = socket() #print("Address:", addr)