如何通过lan向设备发送(和接收)流 [英] How to send to (and receive from) a device a stream over lan

查看:113
本文介绍了如何通过lan向设备发送(和接收)流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,

我是网络编程的新手。我想连接到具有IP地址和端口的设备。之后,我将向该设备发送一个流,并将接收由设备发回的流。

我有一个客户端服务器程序,但它说客户端服务器单独运行。我对客户端程序的运行位置感到困惑。

我可以在一个应用程序上制作它。先生,请建议我。

Sir,
I am new in network programming. I want to get connection to device which has ip address and port. after that i will send a stream to that device and will recieve stream send back by device.
I have a client server program but it says client server runs separately. I am confused on where the client program will run.
Can i make it on a single application. sir please suggest me.

推荐答案

签出套接字编程



这是一个教程,但你可以谷歌的其他例子

使用C#中的套接字 [ ^ ]
Check Out for Socket Programming

This is an tutorial but you can Google other examples
Working with Sockets in C#[^]


您只需要一个客户端程序。它应该创建一个到设备的套接字连接,然后发送和接收,如各种有关套接字编程的教程中所述。设备将充当服务器并应响应客户端命令。您可能需要获取设备文档的副本(如果您还没有)以检查它使用的协议。
You just need a client program. It should create a socket connection to the device, and then send and receive as described in the various tutorials on socket programming. The device will act as the server and should respond to client commands. You may need to get a copy of the documentation for the device (if you do not already have it) to check what protocol it uses.


这篇关于如何通过lan向设备发送(和接收)流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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