开发者

How to connect to a device on network with c#

I have a device on my network that controls a p开发者_开发百科iece of hardware. I can control it with my browser like: http://xx.xx.xx.xxx/setvalue.html?Address_Value_Array={someValueToSendToDevice}

I do not need any form of a response from the device. I'm wondering what is the usual way to accomplish this sort of thing in c#. Thank you.


I would just use a System.Net.WebClient:

        using (System.Net.WebClient wc = new System.Net.WebClient())
        {
            wc.DownloadString("http://xx.xx.xx.xxx/setvalue.html?Address_Value_Array={someValueToSendToDevice}");
        }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜