Skip to content

Commit

Permalink
Document a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne authored and vs-mobiletools-engineering-service2 committed Mar 26, 2024
1 parent 097e904 commit 5ee9940
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/SystemConfiguration/NetworkReachability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ public class NetworkReachability : NativeObject {
// netinet/in.h
[StructLayout (LayoutKind.Sequential)]
struct sockaddr_in {
// size = 28, so 7 * 4 bytes = 28.
// We're defining fields to make the struct the correct size (expected size = 28, so 7 * 4 bytes = 28),
// and then we're defining properties that accesses these fields to get and set field values.
// This looks a bit convoluted, but the purpose is to avoid .NET's built-in marshaling support,
// so that we're able to trim away the corresponding marshalling code in .NET to minimize app size.
uint value1;
uint value2;
uint value3;
Expand Down

0 comments on commit 5ee9940

Please sign in to comment.