Reputation: 477
I need to configure the baud rate of the ethernet port of my pc as 100Mbps. But after searching the net, I couldn't find a way to change the baud rate in the socket in C# code. Is it possible to set the baud rate for the Ethernet port in C#. I actually need to communicate between pc and a micro controller. So if, in the micro controller, the baud rate of the Ethernet port is set to 100Mbps, then will the baud rate of the Ethernet port in PC be also set to 100Mbps automatically?
Thank You
Upvotes: 0
Views: 2176
Reputation: 6638
I think you've got terms and technologies mixed up a bit. It sounds like you're used to working with serial connections (like RS232 or RS422) where both end-points have to be configured in the same manner.
IP networks don't operate that way. On a fairly modern switch, each connected device can have it's own link speed. So the computer can be connected with 1GBps and another computer can have 100MBit, all dependent on what that computers interface can handle.
The network protocol you use should then handle throttling, resending of lost packets and such (like TCP does). If you use UDP you'll have to either not care about lost packets, or implement such mechanisms on your own.
If you connect your computer directly to the micro controller, then yes - the port speed of the computer is probably going to be 100MBit as well. But there is no guarantee. And even if there was, how would you know that the micro controller would actually be able to handle all data sent to it at that maximum theoretical speed?
Upvotes: 3