/* The MIT License Copyright (c) 2010-2013 IsmAvatar and Robert B. Colton Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ This is a list of all error codes you may encounter. http://epydoc.sourceforge.net/stdlib/errno-module.html 2 ENOENT (connect) 4 EINTR 5 EIO 9 EBADF 11 EAGAIN EWOULDBLOCK 12 ENOMEM (send) 13 EACCES (recv) 14 EFAULT 20 ENOTDIR (connect) 21 EISDIR 22 EINVAL (send) 23 ENFILE (socket) 24 EMFILE (socket) 30 EROFS 32 EPIPE (recv) 36 ENAMETOOLONG 40 ELOOP (connect) 63 ENOSR 71 EPROTO (accept) 88 ENOTSOCK 89 EDESTADDRREQ (send) 90 EMSGSIZE (recv) 91 EPROTOTYPE (connect) 93 EPROTONOSUPPORT (socket) 95 EOPNOTSUPP 97 EAFNOSUPPORT (connect) 98 EADDRINUSE (connect) 99 EADDRNOTAVAIL (connect) 100 ENETDOWN (recv) 101 ENETUNREACH (recv) 103 ECONNABORTED 104 ECONNRESET 105 ENOBUFS 106 EISCONN (connect) 107 ENOTCONN 110 ETIMEDOUT (send) 111 ECONNREFUSED 113 EHOSTUNREACH (connect) 114 EALREADY (connect) 115 EINPROGRESS (connect) 13 EACCES (recv) 98 EADDRINUSE (connect) 99 EADDRNOTAVAIL (connect) 97 EAFNOSUPPORT (connect, socket) 11 EAGAIN EWOULDBLOCK 114 EALREADY (connect) 9 EBADF 103 ECONNABORTED 111 ECONNREFUSED 104 ECONNRESET 89 EDESTADDRREQ (send) 14 EFAULT 113 EHOSTUNREACH (connect) 115 EINPROGRESS (connect) 4 EINTR 22 EINVAL 5 EIO 106 EISCONN (connect) 21 EISDIR 40 ELOOP (connect) 24 EMFILE (socket) 90 EMSGSIZE (recv) 36 ENAMETOOLONG 100 ENETDOWN (recv) 101 ENETUNREACH (recv) 23 ENFILE (socket) 105 ENOBUFS 2 ENOENT (connect) 12 ENOMEM 63 ENOSR 107 ENOTCONN 20 ENOTDIR (connect) 88 ENOTSOCK 95 EOPNOTSUPP 32 EPIPE (recv) 71 EPROTO (accept) 93 EPROTONOSUPPORT (socket) 91 EPROTOTYPE (connect) 30 EROFS 110 ETIMEDOUT