diff --git a/Docs/articles/Kernel/Network.md b/Docs/articles/Kernel/Network.md index 18c9ba8f7..cb7abf44b 100644 --- a/Docs/articles/Kernel/Network.md +++ b/Docs/articles/Kernel/Network.md @@ -1,8 +1,8 @@ # Network -In this article we will discuss about Networking on Cosmos, how to use the Network Stack, send and received packets. For now, available protocols are **ARP**, **IPv4**, **UDP**, **ICMP**, **DHCP** and **DNS** but the team is also working on TCP. +In this article we will discuss about Networking on Cosmos, how to use the Network Stack, send and received packets. For now, available protocols are **ARP**, **IPv4**, **UDP**, **ICMP**, **DHCP** and **DNS** but the team is also working on TCP. Note that Cosmos devkit must be installed for this article. -All protocols here don't necessary support every feature described by their RFC and may have some bugs or architecture issues, if you find something abnormal please [submit an issue](http://https://github.com/CosmosOS/Cosmos/issues/new/choose "repository") on our repository. +All protocols here don't necessary support every feature described by their RFC and may have some bugs or architecture issues, if you find bugs or something abnormal please [submit an issue](http://https://github.com/CosmosOS/Cosmos/issues/new/choose "repository") on our repository. Each protocol has a Client class which can be used to receive and send data. If a Receive() method is blocking, the method will timeout after 5 seconds or use the value optionally set by parameter. Please note that all finished connections should be closed using Close(). @@ -82,3 +82,8 @@ using(var xClient = new DnsClient()) xClient.Close(); } ``` +## Utils +## Get local IP +```csharp +Console.WriteLine(NetworkConfig.CurrentConfig.Value.IPAddress.ToString()); +```