I have a main PC that will receive information from many others PCs. The main PC will also send commands to the other PCs.
The PCs will have to read what they have received and do something and call some functions. Now my problem is how can I implement this. I saw WCF, but I think it won’t work in my conditions. So i guess Sockets will work fine but here’s what I want.
Let the clients keep reading the data they are receiving on a specific port and also send the data to the main PC, each client on different port or on the same port where the ID of each PC will be added to the string I’m sending.
For example:
a or b or ab
If I read a or b on the client I should call a specific function. I need something similar to while reading a SERIAL PORT.
Any ideas or examples will be really helpful! I’m a bit confused.
You need to open a socket, and then read continuously a byte at a time. Check if the byte is equal to the byte you’re looking for, and call appropriate methods.
The above code sample should get you started.