C#Socket接收使用HTTP协议请求特定IP地址 [英] C# Socket to receive Request an particular IP Address using HTTP Protocol
问题描述
设备(它将仅发送HTTP请求的未知客户端,< g class =" gr_ gr_27 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id =" 27" id =" 27">>用户< / g>知道
HTTP URL 使用IP地址)将使用以太网或无线发送HTTP请求,我们需要使用套接字或HTTP侦听器C#收集传入请求。可能吗?怎么样 ?提供任何样本。
A device(unknown client it will only send HTTP requests, <g class="gr_ gr_27 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="27" id="27">user</g> knows the HTTP URL using IP Address) will send HTTP Request using ethernet or wireless, we need to collect the incoming request using socket or HTTP listener C# . is it possible? how ? give any sample.
设备将发送多个请求我们希望捕获所有请求并需要处理。
the device will send multiple requests we want to capture all the request and need to process.
推荐答案
您好VJ_1990,
Hi VJ_1990,
感谢您在此发帖。
对于你的问题,你可以使用
TcpClient 。
For your question, you could use TcpClient .
您可以从代码项目下载源文件。
You could download the source file from the code project.
https://www.codeproject.com/Articles/32633/Sending-Files-using-TCP
并根据以下主题更改代码。
And change the code according to the thread below.
最好的问候,
Wendy
这篇关于C#Socket接收使用HTTP协议请求特定IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!