summaryrefslogtreecommitdiffstats
path: root/drivers/unix/net_socket_posix.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use reference to constant in functionsqarmin2019-07-101-1/+1
|
* Merge pull request #30126 from qarmin/remove_unnecessary_codeRémi Verschelde2019-07-011-4/+4
|\ | | | | Remove unnecessary code and add some error explanations
| * Remove unnecessary code and add some error explanationsqarmin2019-07-011-4/+4
| |
* | Properly disable SIGPIPE on OSX network sockets.Fabio Alessandrelli2019-06-281-8/+9
|/ | | | | Disable SO_NOSIGPIPE socket option when avaiable. Use MSG_NOSIGNAL send flag on systems that support it.
* Merge pull request #29941 from qarmin/redundant_code_and_othersRémi Verschelde2019-06-271-4/+1
|\ | | | | Remove redundant code, possible NULL pointers and others
| * Some code changed with Clang-Tidyqarmin2019-06-261-4/+1
| |
* | Merge pull request #29935 from Faless/net/get_if_multicast_prRémi Verschelde2019-06-211-0/+68
|\ \ | |/ |/| Multicast, more network interfaces info
| * Multicast support in NetSocket/PacketPeerUDPFabio Alessandrelli2019-06-211-0/+68
| |
* | Merge pull request #29283 from qarmin/fix_some_always_same_valuesRémi Verschelde2019-06-201-1/+1
|\ \ | |/ |/| Remove always true/false values
| * Fix always true/false valuesqarmin2019-06-201-1/+1
| |
* | Fix compilation warnings in JS and Windows buildsRémi Verschelde2019-06-151-3/+3
|/ | | | | | | | | | Warnings raised by Emscripten 1.38.0 and MinGW64 5.0.4 / GCC 8.3.0. JS can now build with `werror=yes warnings=extra`. MinGW64 still has a few warnings to resolve with `warnings=extra`, and only one with `warnings=all`. Part of #29033 and #29801.
* Ignore a warning in _get_socket_error (-Wlogical-op).marxin2019-05-021-0/+11
| | | | | | | | | | | | | | drivers/unix/net_socket_posix.cpp: In member function 'NetSocketPosix::NetError NetSocketPosix::_get_socket_error()': drivers/unix/net_socket_posix.cpp:197:22: warning: logical 'or' of equal expressions [-Wlogical-op] 197 | if (errno == EAGAIN || errno == EWOULDBLOCK) | ^ and: modules/mono/utils/string_utils.cpp: In function 'int {anonymous}::sfind(const String&, int)': modules/mono/utils/string_utils.cpp:68:48: error: logical 'or' of collectively exhaustive tests is always true [-Werror=logical-op] found = src[read_pos] == 's' || (c >= '0' || c <= '4'); ~~~~~~~~~^~~~~~~~~~~
* Fix typos with codespellRémi Verschelde2019-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | Using codespell 1.14.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang doubleclick lod nd numer que te unselect EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Moved member variables to initializer listWilson E. Alvarez2018-12-111-4/+4
|
* Properly accept wildcard when binding IPv4 socket.Fabio Alessandrelli2018-11-181-2/+1
| | | | | Also never return null for is_ipv4 to avoid crashes due to engine bug. (better to get an error and a broken socket then seeing your game crash)
* Server platform works on OS X tooMarcelo Fernandez2018-10-291-1/+1
|
* Fix warnings in HTML5 build outside platform filesLeon Krause2018-10-061-4/+0
|
* Remove socket_helper.h after NetSocket refactorFabio Alessandrelli2018-09-281-4/+4
|
* Fix invalid comparison warnings: [-Wbool-compare] and [-Wenum-compare]Rémi Verschelde2018-09-271-1/+1
| | | | | | | | | | | | | Fixes the following GCC 5 warnings and actual bugs: ``` drivers/unix/net_socket_posix.cpp:562:28: warning: comparison between 'enum IP::Type' and 'enum NetSocket::Type' [-Wenum-compare] modules/gdscript/gdscript_function.cpp:792:26: warning: comparison of constant '17' with boolean expression is always true [-Wbool-compare] modules/gdscript/gdscript_function.cpp:792:26: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] modules/gdscript/gdscript_parser.cpp:5082:58: warning: comparison of constant '6' with boolean expression is always false [-Wbool-compare] modules/gdscript/gdscript_parser.cpp:5082:58: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] modules/mbedtls/stream_peer_mbed_tls.cpp:286:45: warning: comparison between 'enum StreamPeerTCP::Status' and 'enum StreamPeerSSL::Status' [-Wenum-compare] modules/mbedtls/stream_peer_mbed_tls.cpp:313:45: warning: comparison between 'enum StreamPeerTCP::Status' and 'enum StreamPeerSSL::Status' [-Wenum-compare] ```
* Fix Winsock UDP ECONNRESET/ENETRESET bugFabio Alessandrelli2018-09-221-0/+21
| | | | | | | | | | | | | Since Windows 2000: Calling recv/recvfrom when an ICMP reply was received from a previous send/sendto, may result in a WSAECONNRESET error. Since Windows Vista(?)/Windows Server 2008: Calling recv/recvfrom when an ICMP reply was received from a previous send/sendto, may also result in a WSAENETRESET error. Both those features are disabled by this commit using disabling SIO_UDP_CONNRESET and SIO_UDP_NETRESET on newly created UDP sockets.
* Detect POLLERR revents too in NetSocketPosix.Fabio Alessandrelli2018-09-221-0/+1
| | | | Usually indicate an RST was received by a TCP socket.
* Use select instead of WSAPoll on Windows.Fabio Alessandrelli2018-09-221-4/+51
| | | | | | | | | WSAPoll is broken by design. It was announced as the new way to introduce compatibility to posix sockets, their implementation was broken, and they decided not to fix it. You can read the full story here: https://daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken/
* Properly initialize Winsock on startupFabio Alessandrelli2018-09-131-1/+18
| | | | Also fix typo in _get_last_error which caused Winsock connect to fail.
* New NetSocket interface, BSD/Win implementationFabio Alessandrelli2018-09-121-0/+535
Unified BSD and Winsock sockets into a single implementation of a generic NetSocket interface. This is some ground work for few network improvements: - Reuse as much code as possible between Posix and Windows. - Provide a single point of implementation for exotic sdks (consoles). - Provide platform agnostic StreamPeerTCP and PacketPeerUDP in core. - Implement connect for UDP allowing for DTLS implementation.