Home > Software engineering >  I returned to the data on the server to receive the client, want to used for light show
I returned to the data on the server to receive the client, want to used for light show

Time:10-31

I let the client to the server sends a string, now want to implement port inspection, if detected port receives this string, will show a green light, ideas should be?
I now have ideas on port scanning and how to display lamp, just don't know how to put them together

CodePudding user response:

Detect port receive particular string, to save the current system time and the string to the two global variable
In a thread or message loop (Windows), or clock interrupt service program related (single chip microcomputer system or pure DOS system), to check the two global variables, if the variable in time and the current system time difference is small. Such as 1 seconds and wasn't changed lamp state, and the current state and to change the lamp light condition is different, the modified light condition,

CodePudding user response:

Your port after receiving the data active the call control function of light to trigger
  • Related