IdUDPClient发送数据,可不可以用目标机的 主机名 代替IP ?
时间:2011-12-20
来源:互联网
IdUDPClient发送数据,可不可以用目标机的 主机名 代替IP ?
现在用的方法是:
IdUDPClient1->Host = "172.16.113.220";
IdUDPClient1->Port = 8080;
IdUDPClient1->Send(s, NULL); //顺便问一下,此处的第二个参数是干嘛用的???
我希望将IP替换成目标机器的主机名(同一局域网下),如“PC_name”,请问如何实现?
谢谢
现在用的方法是:
IdUDPClient1->Host = "172.16.113.220";
IdUDPClient1->Port = 8080;
IdUDPClient1->Send(s, NULL); //顺便问一下,此处的第二个参数是干嘛用的???
我希望将IP替换成目标机器的主机名(同一局域网下),如“PC_name”,请问如何实现?
谢谢
作者: syrchina 发布时间: 2011-12-20
Host可以是IP,也可以是主机名称
Host is a String property used to identify the address of the remote computer system. Host and Port are used to build the UDP datagram packet, and identify the endpoint for the transmission.
Host can contain an IP address in dotted-decimal form, such as "129.71.2.4", or a computer name, such as "wvnvm.wvnet.edu". If the destination is also the machine where the UDP client is running, use "127.0.0.1" in Host.
Host is a String property used to identify the address of the remote computer system. Host and Port are used to build the UDP datagram packet, and identify the endpoint for the transmission.
Host can contain an IP address in dotted-decimal form, such as "129.71.2.4", or a computer name, such as "wvnvm.wvnet.edu". If the destination is also the machine where the UDP client is running, use "127.0.0.1" in Host.
作者: ksrsoft 发布时间: 2011-12-20
你这个IdUDPClient是什么版本的,cb6中的没有这个定义啊
procedure Send(AData: string); overload;
procedure Send(AData: string); overload;
作者: ksrsoft 发布时间: 2011-12-20
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28