mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 04:18:43 +00:00
Update Network.md
This commit is contained in:
parent
b5876d6665
commit
a9a3f6401b
1 changed files with 7 additions and 2 deletions
|
|
@ -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());
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue