TCP客户端服务器型号并行端口编程 [英] TCP client server model & parallel port programming
问题描述
我新加入了这个论坛,需要您的帮助.我正在尝试开发将在以下服务的C#代码:
1.两台PC将通过LAN连接,并且可以相互ping通(不需要任何代码,只需确保可访问性即可)
2.我浏览了几篇文章,并对如何使用TCP和套接字概念开发客户端-服务器模型有了一个粗略的认识
3.我将从客户端向服务器发送字符串"LED01 ON"
4.服务器一旦获得字符串,就会将逻辑1发送到并行端口,该并行端口将打开LED01
5.发送字符串"LED01 OFF"将执行相反的操作
6.我想为2个LED实施它
请提出建议,以便我可以轻松做到..
//Zahid
Hi,
I have joined in this forum newly & need your help. I am trying to develop a C# code which will serve below:
1. Two PC''s will be connected by LAN & will be able to ping each other (don''t need any code-just ensuring reach-ability)
2. I have gone through several articles & got rough idea how to develop client-server model using TCP & socket concept
3. From client i shall send string "LED01 ON" to server
4. As soon as the server will get the string, it will send logical 1 to parallel port which will turn on LED01
5. Sending string "LED01 OFF" will do the opposite
6. I want to implement it for 2 LEDs
Please suggest so that i can do it easily..
//Zahid
推荐答案
有关并行端口编程的示例,请参见:
未经审查的I/O端口-1-通过并行端口控制LED(发光二极管) [ ^ ]
请参阅我过去有关套接字网络设计的答案:
来自同一端口号的多个客户端 [在C#和套接字编程中使用api [如何获取keydown事件在vb.net中的不同线程上操作 [
For samples on parallel port programming, see this:
I/O Ports Uncensored - 1 - Controlling LEDs (Light Emiting Diodes) with Parallel Port[^]
See my past Answers on socket networking designs:
Multple clients from same port Number[^],
using api in c# and socketprogramming[^].
The design of networking services and clients is tightly related to threading. Find is a useful collection of my past Answers on related topics:
How to get a keydown event to operate on a different thread in vb.net[^].
—SA
这篇关于TCP客户端服务器型号并行端口编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!