Difference between revisions of "Programmering III December"

From Teknologisk videncenter
Jump to: navigation, search
(Created page with "===UDP listener:=== '''Server:''' <source lang="Csharp"> UdpClient client = new UdpClient(11000); IPEndPoint endpoint = new IPEndPoint(IPAddress.Any, 11000); ...")
 
(Replaced content with "Intet at se her")
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
===UDP listener:===
+
Intet at se her
 
 
'''Server:'''
 
<source lang="Csharp">
 
UdpClient client = new UdpClient(11000);
 
            IPEndPoint endpoint = new IPEndPoint(IPAddress.Any, 11000);
 
 
 
            byte[] recivedBytes = client.Receive(ref endpoint);
 
            Console.WriteLine("The message was:");
 
            string result = Encoding.ASCII.GetString(recivedBytes);
 
            Console.WriteLine(result);
 
 
 
            Console.ReadKey();
 
</source>
 

Latest revision as of 07:36, 2 June 2017

Intet at se her