C# - UDP Server / Client Tutorial

Поделиться
HTML-код
  • Опубликовано: 6 май 2021
  • more detailed article and source code: k23-software.net/kftvi
    contact: contact@k23-software.net
    C# - UDP Server / Client Tutorial
  • НаукаНаука

Комментарии • 10

  • @angelldark6426
    @angelldark6426 Год назад +1

    Do you have a video on how to create a server using (UdpClient ) - server and client ?

  • @SonnyMarTe
    @SonnyMarTe 5 месяцев назад

    In this example the udp Server sends the data to the client , am I correct?

  • @user-ee9bn3jb5e
    @user-ee9bn3jb5e 2 года назад

    4:20
    what is this fade in script?

    • @k23software
      @k23software  2 года назад

      What exactly do you mean?

    • @GoRoSaTos
      @GoRoSaTos 2 года назад

      He's changing from server code to client code

  • @funknick
    @funknick 2 года назад +1

    You forgot to put a `_socket.Connect(_ep);` in the UDPClient. If you follow these instructions as shown here, the client will never be listening properly.

    • @k23software
      @k23software  2 года назад +1

      It was left out intentionally since UDP is a connectionless protocol. The client is just listening for data from the specified endpoint, without really connecting to the server.

    • @funknick
      @funknick 2 года назад

      @@k23software in testing, I found that the listen operation would never pick up the response from the server unless I called Connect(...).

    • @k23software
      @k23software  2 года назад +1

      @@funknick Interesting. I just tested it again and it works with and without Connect() for me. Thank you for pointing that out.

    • @funknick
      @funknick 2 года назад +1

      @@k23software I have a full NUnit testing suite around my implementation of Client/Server, so weird that it works on your end but not on my end. The code isn't even that complicated, but I will dig in and see if I can find out why it's funny on my end.