summaryrefslogtreecommitdiffstats
path: root/core/io/stream_peer_tcp.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* FIX: Return if TCP is in STATUS_CONNECTEDYorick de Wid2024-04-161-0/+1
| | | If the `StreamPeerTCP` is polled and the TCP connection is `STATUS_CONNECTED` it should return after polling netsocket. Without `return` poll keeps calling `_sock->connect_to_host` and `connect()`.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-2/+2
| | | | change warnings=all to use /W4.
* [Net] Fix StreamPeerTCP accepted status.Fabio Alessandrelli2022-05-041-1/+1
|
* [Net] Drop is_connected_to_host for TCP and UDP.Fabio Alessandrelli2022-03-271-7/+2
| | | | | | | | | | The UDP method is now called `is_socket_connected` to limit confusion with the actual host connection status which doesn't make sense in UDP. The TCP method is completly dropped, use get_status instead. The only one left is the WebSocketPeer one, which should be fine as is for now.
* [Net] Make StreamPeerTCP::_poll_connection explicit.Fabio Alessandrelli2022-03-271-51/+25
| | | | | | No longer hacked into `get_status` and renamed to `poll`. The old `poll` (for *nix `poll`, win `select`) is now called `wait`.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio2021-05-061-6/+6
|
* Allow local port control on net_socket connectionsdam2021-04-121-8/+35
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-3/+6
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-32/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-4/+1
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Add TCP poll function (not exposed).Fabio Alessandrelli2020-03-081-0/+5
| | | | Used to know if we can read or write without blocking.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Update stream_peer_tcp.cppDamian Day2019-09-251-10/+1
|
* TCP is_connected_to_host comparison errorDamian Day2019-09-211-1/+1
| | | We was returning true when the state was not connected, so we would never return true when the state was connected.
* Add TCP connect timeout.Fabio Alessandrelli2019-07-081-0/+12
| | | | | | | | | Default timeout is 30 seconds (i.e. after 30 seconds of calling connect_to_host if the TCP peer is not connected the connection will error out). This value can be configured in project settings: `network/limits/tcp/connect_timeout_seconds`
* WebSocket module now uses wslay library.Fabio Alessandrelli2019-07-041-0/+5
| | | | | | | | | | Both client and server are supported on native builds (as usual). SSL server is still not supported, but will soon be possible with this new library. The API stays the same, we just need to work out potential issues due to this big library switch.
* Some code changed with Clang-Tidyqarmin2019-06-261-1/+0
|
* 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-6/+5
|
* Add checks for clean disconnect in HTTP/TCP/SSL.Fabio Alessandrelli2018-09-211-0/+17
| | | | | Half-open TCP connection can, of course, only be detected by writing the socket, or waiting for TCP timeout.
* Fix TCP connecting state not set correctlyFabio Alessandrelli2018-09-131-17/+14
|
* Unify StreamPeerTCP/TCP_Server with NetSocket APIFabio Alessandrelli2018-09-121-16/+281
|
* Fix DNS resolution when cache is invalid.Fabio Alessandrelli2018-08-281-2/+1
| | | | Fix StreamPeerTCP.connect_to_host return value.
* Display set_nodelay to GDScriptMarlon Henry Schweigert2018-01-301-0/+1
| | | | | | | | | | | Pass enabled arg Rename set_nodelay to set_no_delay Add description to the method Change description
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry2017-08-201-4/+4
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-21/+18
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-6/+6
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* Remove set_ip_type from network classes (no longer needed)Fabio Alessandrelli2017-01-231-8/+1
| | | | | | | | | | | | | - TCP: - `listen` bind to wildcard "*" -> dual stack socket - `listen` bind to address -> socket from address type - `connect` -> resolve using best protocol (UNSPEC), socket from address type - UDP: - `listen` bind to wildcard "*" -> dual stack socket - `listen` bind to address -> socket from address type - `put_packet`/`put_var` -> resolve using TYPE_ANY (UNSPEC), socket from address type (to change socket type you must first call `close` it)
* Convert validity checks of IP_Address to is_valid method.Fabio Alessandrelli2017-01-231-1/+1
|
* removed duplicated functions in class hierarchy that were bound more than onceJuan Linietsky2017-01-141-5/+5
| | | | added a check to detect this case in the future
* ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky2017-01-021-7/+7
| | | | | | | | Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
* Merge pull request #7271 from Faless/ipv6_cleanupRémi Verschelde2017-01-021-5/+10
|\ | | | | Fixes and improvementes for IPv6 implementation.
| * Allow setting ip_type for TCP/UDP and HTTP classesFabio Alessandrelli2016-12-091-0/+6
| |
| * Migrate int.IP_TYPE_ constants to IP.TYPE_Fabio Alessandrelli2016-12-091-3/+1
| |
| * Use an instance variable for ip_type in raw socketsFabio Alessandrelli2016-12-091-3/+4
| | | | | | | | | | | | | | PacketPeerUDP/StreamPeerTCP/TCP_Server now uses an instance variable to store the selected ip_type (IPv4/IPv6/ANY, where ANY = dual stack). All calls to resolve addresses, sending/receving data, connecting/listening will use that socket type.
* | Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
|/ | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* Add optional IP type param in TCP/UDP connect/set_send_addressFabio Alessandrelli2016-10-301-1/+18
|
* Update copyright to 2016 in headersGeorge Marques2016-01-011-1/+1
|
* Updated copyright year in all headersJuan Linietsky2015-04-181-1/+1
|
* change parameter name from ip to portDana Olson2015-01-011-1/+1
|