Commit graph

57 commits

Author SHA1 Message Date
Stepan Goremykin 8d7e4229ca Merge branch 'master' into fix-resharper-warnings
# Conflicts:
#	Emby.Server.Implementations/Net/SocketFactory.cs
#	RSSDP/SsdpCommunicationsServer.cs
#	RSSDP/SsdpDeviceLocator.cs
#	RSSDP/SsdpDevicePublisher.cs
2023-10-12 20:11:16 +02:00
Tim Eisele dc27d8f9cd
Refactor URI overrides (#10051) 2023-10-11 00:02:37 +02:00
Stepan Goremykin 47254d6a22 Remove conditional access when it is known to be not null 2023-10-08 00:46:15 +02:00
Stepan Goremykin 8925390ad4 Remove redundant cast 2023-10-07 23:42:15 +02:00
Shadowghost bedee7922f Fix interface address assignment and resolution in SSDP 2023-02-17 18:24:13 +01:00
Shadowghost 42498194d9 Replace ISocket and UdpSocket, fix DLNA and SSDP binding and discovery 2023-02-17 17:39:11 +01:00
Shadowghost 6e46075414 Apply review suggestions 2023-01-19 19:03:43 +01:00
Shadowghost b725fbe51a Apply review suggestions 2022-12-13 10:39:37 +01:00
Shadowghost 2c86bd1875 Merge branch 'master' into network-rewrite 2022-12-07 17:40:24 +01:00
Bond_009 52194f56b5 Replace != null with is not null 2022-12-05 15:01:13 +01:00
Shadowghost 7b90fcd053 Merge branch 'master' into network-rewrite 2022-10-07 09:16:02 +02:00
Bond_009 a9a5fcde81 Use ArgumentNullException.ThrowIfNull helper method
Did a simple search/replace on the whole repo (except the RSSDP project)
This reduces LOC and should improve performance (methods containing a throw statement don't get inlined)

```
if \((\w+) == null\)
\s+\{
\s+throw new ArgumentNullException\((.*)\);
\s+\}
```

```
ArgumentNullException.ThrowIfNull($1);
```
2022-10-06 20:21:23 +02:00
Shadowghost 4fc52a840c Merge branch 'master' into network-rewrite 2022-10-01 19:59:00 +02:00
Bond-009 2d57e71b44
Don't allow throwing System.Exception (#8378) 2022-09-11 17:56:41 -06:00
Shadowghost f6e41269d9 Enforce interface bindings on SSDP, add Loopback to LAN if no LAN defined 2022-07-21 09:26:18 +02:00
Bond_009 470d175f32 ExclusiveAddressUse: cheated by the docs 2022-03-10 20:51:22 +01:00
Bond_009 1d018c5575 SocketFactory: Remove redundant code
ExclusiveAddressUse should be false by default afaik
2022-03-08 22:20:43 +01:00
Bond_009 832da133d8 Always create TaskCompletionSource<T> with TaskCreationOptions.RunContinuationsAsynchronously 2022-01-22 17:06:57 +01:00
Bond_009 ea8f40e84a More cleanup 2021-12-27 14:20:05 +00:00
Patrick Barron 8c8ca9aded Fix warnings in UdpSocket 2021-10-03 21:41:22 -04:00
Bond_009 637e86478f Fix some warnings 2021-09-03 19:32:11 +02:00
Bond_009 7e8428e588 Enable nullable reference types for Emby.Server.Implementations 2021-05-20 22:48:53 +02:00
Bond_009 01e781035f Fix warnings 2020-07-24 16:37:54 +02:00
BaronGreenback f01baad05e Sending multicasts out of Sockets without setting the broadcast to true - causes the error "Bad value for ai_flags" on some systems (#3404)
The underlying cause looks to be https://github.com/dotnet/runtime/issues/28630.

Basically, it's an access denied bug.
It looks like multicasts need the same access rights as broadcasts on some systems.
2020-06-24 17:23:16 +01:00
BaronGreenback c07d8abfd5 Removed debugging info 2020-06-24 17:11:02 +01:00
BaronGreenback 5b0c182908 Added logging and broadcast = true
Not intended for merge into the fork.
2020-06-24 14:31:17 +01:00
telans 98db8f72e0
fix SA1503 for one line if statements 2020-06-20 20:35:29 +12:00
telans 3d9049ef08
fix SA1508 2020-06-15 10:45:55 +12:00
telans acd4389653
fix SA1005 2020-06-15 10:41:00 +12:00
Bond_009 4748105dce Enable TreatWarningsAsErrors for Jellyfin.Server.Implementations in Release mode 2020-05-29 11:28:19 +02:00
Bond_009 04f826e50c Fix merge errors 2020-05-02 01:09:35 +02:00
Bond_009 15634a1913 Merge branch 'master' into websocket 2020-05-02 00:54:04 +02:00
Bond_009 87d2479b78 Fix warnings 2020-01-31 22:26:53 +01:00
Bond_009 976459d3e8 Rewrite WebSocket handling code 2020-01-13 20:06:08 +01:00
Bond-009 ded9857f45 Clean up server discovery code 2020-01-12 18:59:10 +01:00
Bond_009 5dd332b63d Attempt to fix #1391 2019-08-28 13:55:36 +02:00
Bond_009 1cad93c276 Use System.Net abstractions instead of raw socket 2019-08-09 22:38:31 +02:00
Bond_009 998017a76d Include library via NuGet instead of via source 2019-07-29 16:01:14 +02:00
Bond_009 ddd1a282ea Remove IpAddressInfo and IpEndPointInfo classes 2019-07-25 00:15:06 +02:00
Bond-009 e64aaebbac Improvements around streams
* Use ArrayPool instead of allocating new buffers each time
* Remove NetworkStream copy
* Remove some dead code
2019-03-13 21:11:01 +01:00
Claus Vium fb1de5a921 Remove more cruft and add the beginnings of a socket middleware 2019-02-27 23:22:55 +01:00
Claus Vium 27e7e792b3 Replace some usage of QueryParamCollection 2019-02-27 14:23:39 +01:00
Claus Vium d6c6f3c10c Still broken 2019-02-26 22:11:21 +01:00
William Taylor 65cd3ed597 Replaced injections of ILogger with ILoggerFactory
This makes resolving dependencies from the container much easier as
you cannot resolve with primitives parameters in a way that is any
more readable.

The aim of this commit is to change as little as possible with the end
result, loggers that were newed up for the parent object were given the same
name. Objects that used the base or app loggers, were given a new logger with
an appropriate name.

Also removed some unused dependencies.
2019-01-20 21:05:12 +00:00
Erwin de Haan 65bd052f3e ReSharper conform to 'var' settings 2019-01-13 21:37:13 +01:00
Erwin de Haan e566d9a231 Find+Sed BOM removal *.cs: BDInfo-Emby.XmlTv 2019-01-13 20:54:44 +01:00
Erwin de Haan 39ef1106d7 Visual Studio Reformat: Emby.Server.Implementations Part Liv-P 2019-01-13 20:22:00 +01:00
Erwin de Haan e2751d42e8 Merge branch 'dev' into code-cleanup 2019-01-11 12:50:36 +01:00
Erwin de Haan ec1f5dc317 Mayor code cleanup
Add Argument*Exceptions now use proper nameof operators.

Added exception messages to quite a few Argument*Exceptions.

Fixed rethorwing to be proper syntax.

Added a ton of null checkes. (This is only a start, there are about 500 places that need proper null handling)

Added some TODOs to log certain exceptions.

Fix sln again.

Fixed all AssemblyInfo's and added proper copyright (where I could find them)

We live in *current year*.

Fixed the use of braces.

Fixed a ton of properties, and made a fair amount of functions static that should be and can be static.

Made more Methods that should be static static.

You can now use static to find bad functions!

Removed unused variable. And added one more proper XML comment.
2019-01-10 20:38:53 +01:00
hawken ba1794f64b Remove tabs and trailing whitespace 2019-01-07 23:24:34 +00:00