简体   繁体   English

从IP端口读取数据

[英]Read data from IP port

I am having an static IP (amazon ec2 instance) and a defined port which is connected to a device.我有一个静态 IP(亚马逊 ec2 实例)和一个连接到设备的定义端口。 This device send data on this particular port usually every minute over the GSM network.该设备通常每分钟通过 GSM 网络在此特定端口上发送数据。

For eg.172.20.1.170 is the IP and 4001 is port.例如,172.20.1.170 是 IP,4001 是端口。

I am using C# socket to read the data but it is giving error "No connection could be made because the target machine actively refused it 172.20.1.170:4001"我正在使用 C# 套接字读取数据,但出现错误“无法建立连接,因为目标机器主动拒绝了它 172.20.1.170:4001”

Please suggest the sample code to read the data from the IP and port请建议示例代码从IP和端口读取数据

尝试从网络浏览器(chrome、firefox)点击嵌入在你设备中的 ip 和端口。 . 你也可以试试超级终端..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM