What is the specific function of a SerialPort in computer communication?