I have a file with some "content".
Q: How can I send this files content to a given port to a given IP?
You first need to know what protocol is running on the destination port. Then you have to find an application that can handle that protocol.
For instance, if the destination port is an ftp server (or daemon), then you have to use an ftp-client (e.g. ftp or filezilla) to send your file to the destination.
ftp = file transfer protocol.
If the destination is port is an ssh server (or daemon), then you can use scp to copy your file accross.
ssh = secure shell.
nc(1). But what needs to happen once the contents of a file get to a given port?