请求和响应TCP ​​/IP [英] Request and Response TCP/IP

查看:81
本文介绍了请求和响应TCP ​​/IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
现在我有一个TCP/IP问题.我想使用"B01334s3 @@"之类的TCP/IP将消息发送到计算机.机器响应为"3 @@".因此,我使用TCPClient(例如TCPClient.BeginConnect(...,...,...))进行发送.因此,我该如何捕捉机器响应(值"3 @@").请给我建议,如果可能的话:sigh:

Hi All,
now i have a problem with TCP/IP. i want to send message to Machine using TCP/IP such as "B01334s3@@". and machine response "3@@". So i send using TCPClient such as TCPClient.BeginConnect(...,...,...). So how do i catch machine response (the value "3@@"). pls advice me if possible :sigh:

推荐答案

您保持连接打开并尝试从网络流中读取.请点击下面的链接以获取更多信息和示例:

http://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient.getstream.aspx [ ^ ]

祝你好运!
You keep the connection open and try to read from the network stream. Follow link below for more info and example:

http://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient.getstream.aspx[^]

Good luck!


这篇关于请求和响应TCP ​​/IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆