You are currently viewing the C# 2005 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
Hello,
I have to read data from serail port(com) and then send that data to other computer through tcp/ip communication.
wht i m thinking is to read the data in serial port store it in some file and then send it through some other pc through tcp/ip.Is there any way to avoid storing the data. Or is there any other method.
thanks in advance.
quote:Originally posted by watashi
Hello,
I have to read data from serail port(com) and then send that data to other computer through tcp/ip communication.
wht i m thinking is to read the data in serial port store it in some file and then send it through some other pc through tcp/ip.Is there any way to avoid storing the data. Or is there any other method.
thanks in advance.
watashi
I assume that the other computers are connected in a LAN.
If the other computers have defined a "shared" folder you can simply store a file there.
Otherwise you will have to build a program (windows service) that runs on the other computers and listens to a tcp-port (see the chapters about .NET Remoting and Windows Services in "Professional Visual C# 2005"). You can also build a web-service (if you have IIS available on the other computers). Of course you will have to define one or a few classes (message-classes) for sending/receiving the data and an appropriate version of .NET Framework must be installed on every computer.
If you use remoting or a web-service you don't have to store the data first. You can directly send it to the other computers, but as I mentioned before, the other computers must have some program running for communication.