InspIRCd Robot
ae3e2db109
Update copyright headers.
2024-06-07 10:37:56 +01:00
Sadie Powell
e26cb5cacd
Fix some Doxygen comment issues.
2023-01-21 13:32:53 +00:00
Sadie Powell
c631b784ba
Replace SocketEngine::SetReuse with SocketEngine::SetOption.
2023-01-17 04:45:26 +00:00
Sadie Powell
d048778f78
Merge branch 'insp3' into master.
2023-01-01 13:19:45 +00:00
InspIRCd Robot
2b810b412a
Update copyright headers.
2022-12-30 11:31:28 +00:00
Sadie Powell
b1eb362d83
Refactor SocketEngine slightly.
...
- Remove pointless shutdown() wrapper.
- Remove pointless bounds checking function.
- Make Bind and Listen take an EventHandler instead of a fd.
- Add nullability attributes to every method.
2022-12-25 22:41:28 +00:00
Sadie Powell
5e44188857
More const correctness work.
2022-12-08 10:19:47 +00:00
Sadie Powell
a4ec09b455
Clean up various socket-related code.
2022-10-12 19:34:22 +01:00
Sadie Powell
89537ed2ab
Fix various cases of the &* being next to the name instead of type.
2022-09-29 12:36:01 +01:00
Sadie Powell
d79147e7af
Abolish the infernal space before accessibility keywords.
2022-01-25 14:02:36 +00:00
Sadie Powell
421e8c8c79
Add the final keyword to all remaining classes that can have it.
2021-12-20 20:19:40 +00:00
Sadie Powell
d95d7fc4f5
Merge branch 'insp3' into master.
2021-07-01 12:33:51 +01:00
Josh Soref
de6d4dbd1e
Fix various spelling issues ( #1883 ).
...
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-06-21 21:47:06 +01:00
Dominic Hamon
02340285c5
Added -Wshorten-64-to-32 and fixed all warnings.
2021-05-30 20:37:54 +01:00
Sadie Powell
ba6332b8ec
Rip out the SwapInternals method.
...
This never really worked correctly and will now be replaced with
something better.
2021-04-19 00:14:53 +01:00
Sadie Powell
7d84e4900f
Fix a ton of pedantic compiler warnings.
2021-04-04 23:42:15 +01:00
Sadie Powell
0194f799b9
Merge branch 'insp3' into master.
2021-03-31 15:04:15 +01:00
Sadie Powell
952ee5cc60
Fix various documentation comments.
2021-03-31 10:51:51 +01:00
Sadie Powell
e76b208ce8
Merge branch 'insp3' into master.
2021-03-05 09:54:26 +00:00
Sadie Powell
2ba32afa9a
Fix a bunch of really obvious unnecessary includes.
2021-03-05 09:17:13 +00:00
Sadie Powell
1e1cf527d2
Merge branch 'insp3' into master.
2021-03-05 02:32:35 +00:00
InspIRCd Robot
7b1ab06a95
Update copyright headers.
2021-03-05 02:16:11 +00:00
Sadie Powell
4e488cb54d
Refactor classbase/CullResult into Cullable/Cullable::Result.
2021-03-02 05:56:56 +00:00
Sadie Powell
579a17df38
Clean up a bunch of contructors and destructors.
2020-11-01 02:22:41 +00:00
Sadie Powell
b755d2a778
Merge branch 'insp3' into master.
2020-05-05 22:03:14 +01:00
InspIRCd Robot
44489ddf7e
Update copyright headers.
2020-04-24 10:23:47 +01:00
InspIRCd Robot
4f9abe96a4
Fixes by misspell-fixer
2020-04-21 00:52:12 -06:00
Sadie Powell
7bdd72f634
Merge branch 'insp3' into master.
2020-02-19 01:29:45 +00:00
Sadie Powell
24f1224f77
Add HasFd to EventHandler and switch code to use it.
2020-02-15 06:25:12 +00:00
Sadie Powell
98e4ddfb21
Use C++11 inline initialisation for class members.
2020-02-06 11:25:42 +00:00
InspIRCd Robot
aa692dc103
Update copyright headers.
2020-01-11 22:14:43 +00:00
Peter Powell
5f387071d3
Add a method for swapping user I/O handlers.
2019-07-21 16:57:19 +01:00
Peter Powell
1a157c1e5c
Resize the event sets to 2x the CurrentSetSize in ResizeDouble().
2019-05-14 16:28:11 +01:00
Peter Powell
b7ecd18b73
Pass an irc::socket::sockaddrs to SocketEngine::SendTo().
2018-01-20 12:24:35 +00:00
Peter Powell
b18e6b5556
Pass an irc::socket::sockaddrs to SocketEngine::Connect().
2018-01-20 12:08:09 +00:00
Peter Powell
63e300ed08
Deduplicate error handling in the socket engines.
2017-10-22 19:45:05 +01:00
Peter Powell
b109871277
Convert GetMaxFds() to size_t and deduplicate setting code.
2017-10-22 19:44:45 +01:00
Peter Powell
2e331b313f
Remove some outdated documentation from the SocketEngine class.
2017-08-26 16:07:52 +01:00
Peter Powell
a62ae50007
Fix a bunch of Doxygen warnings.
2017-08-26 09:58:15 +01:00
Robin Burchell
8e8b0719bf
Improve and centralize socket engine event counters.
...
The write counters were close to useless because they were only
incremented on a write "event" which is only triggered when writing
would block.
Read handling was a little more useful in that all reads must happen
through the socket engine, so these were happening at the correct time,
but we can clean this up by doing it in the SE itself rather than each
platform port.
This means that both read and write events are now easily and usefully
defined as "a syscall of either read or write was attempted".
We also count empty read and write events as being an event, because
they still were an attempt to poll a socket in some way. This may help
to identify "bad" code which is repeatedly trying to read a socket for
some reason.
Lastly, we check for failed read/write calls, and log them as an error
event. A lot of the time, this is how sockets are determined as being
disconnected (ie. at read/write time).
While we're at it, split Update() in two to make the calls more
self-describing. This has no real impact since only one call is made at
a time anyway.
2017-07-11 14:22:02 +02:00
Attila Molnar
96642de3b2
Update description of class EventHandler
...
Readable() and Writeable() was removed long ago
2016-08-11 11:23:38 +02:00
Attila Molnar
c6ebf05e02
Replace HandleEvent() references in the SocketEngine documentation with OnEventHandler*()
2016-08-11 11:19:28 +02:00
Attila Molnar
612384b3d4
Dispatch EventHandler events to dedicated virtual functions
...
Remove enum EventType
2015-04-12 16:20:13 +02:00
Attila Molnar
e0e1becc2f
Add SocketEngine::WriteV()
2015-03-04 20:18:37 +01:00
Attila Molnar
5a6fd54f8f
Change the number reported by SocketEngine::GetMaxFds() to be informal
...
Do not exit if we can't determine it
2014-06-07 13:47:26 +02:00
Attila Molnar
4ec65c6231
Call DelFd() and SetFd(-1) from SocketEngine::Close(EventHandler*)
2014-02-09 17:17:04 +01:00
Attila Molnar
efe77ba63b
Change all socketengine methods to be static
2014-02-08 23:01:44 +01:00
Attila Molnar
689996cb88
Move socketengine stats into a new class
2014-02-08 22:40:30 +01:00
Attila Molnar
b01820c079
Rename SocketEngine::AddFd() and DelFd() to AddFdRef() and DelFdRef()
2014-02-08 22:25:06 +01:00
Attila Molnar
ed6176383e
Replace SocketEngine::GetName() with INSPIRCD_SOCKETENGINE_NAME define
2014-02-08 13:16:31 +01:00