如何在Borland C ++ Builder中使用TUDPSocket?

时间:2021-02-28 15:05:55

Unfortunately I'm stuck with Borland C++ Builder and I need to recive UDP data. I have set up an TUDPSocket that can send data just fine, but I have no idea of how to get it to recive.

不幸的是,我坚持使用Borland C ++ Builder,我需要重新接收UDP数据。我已经设置了一个可以很好地发送数据的TUDPSocket,但是我不知道如何让它重现。

  • Does anyone have an example of that?
  • 有没有人有这方面的例子?

  • Do I need to set the LocalHost and LocalPort properties?
  • 我是否需要设置LocalHost和LocalPort属性?

  • Can I use the OnRecive event?
  • 我可以使用OnRecive事件吗?

    The documentation I have found so far surfin the net is sparse and confusing... Oh, and I don't want to use Indy... The Indy components breaks everything on my machine. There is probably something wrong with the install but I don't have the time/mental strength to go and fix that.

    1 个解决方案

    #1


    Didn't C++ Builder share most of its libs with Delphi? Maybe there is more documentation on the Delphi side of things that you can extrapolate from?

    C ++ Builder没有与Delphi共享大部分库吗?也许有更多关于Delphi方面的文档可以从中推断出来?

    Worst case, can't you just use some other socket lib?

    最坏的情况,你能不能只使用其他一些套接字库?

    #1


    Didn't C++ Builder share most of its libs with Delphi? Maybe there is more documentation on the Delphi side of things that you can extrapolate from?

    C ++ Builder没有与Delphi共享大部分库吗?也许有更多关于Delphi方面的文档可以从中推断出来?

    Worst case, can't you just use some other socket lib?

    最坏的情况,你能不能只使用其他一些套接字库?