summaryrefslogtreecommitdiff
path: root/serial
diff options
context:
space:
mode:
authorcliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2014-07-31 22:13:19 +0000
committercliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2014-07-31 22:13:19 +0000
commit497c1d804a4203a7c06998804b25fe1c56553b45 (patch)
tree9971743ecc4067068a3dbb008edc9fd0998ca79a /serial
parentc00ef647297d5706e533334eea28fcb00cc461db (diff)
downloadpyserial-497c1d804a4203a7c06998804b25fe1c56553b45.tar.gz
[FTR pyserial:37] Support fileno() function in the socket protocol
git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@496 f19166aa-fa4f-0410-85c2-fa1106f25c8a
Diffstat (limited to 'serial')
-rw-r--r--serial/urlhandler/protocol_socket.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/serial/urlhandler/protocol_socket.py b/serial/urlhandler/protocol_socket.py
index c90a8e4..09a23d0 100644
--- a/serial/urlhandler/protocol_socket.py
+++ b/serial/urlhandler/protocol_socket.py
@@ -242,7 +242,11 @@ class SocketSerial(SerialBase):
return True
# - - - platform specific - - -
- # None so far
+
+ # works on Linux and probably all the other POSIX systems
+ def fileno(self):
+ """Get the file handle of the underlying socket for use with select"""
+ return self._socket.fileno()
# assemble Serial class with the platform specific implementation and the base