Before the mid-nineteenth century, the only realistic way one vessel could talk to another vessel or shore station was by the use of signalling flags or by semaphore (again using flags). This was of course by a line of sight only.
A maritime traveler guide and services site.