I have agent running on localhost on port 20001. Sending data to that port does not trigger any errors in zabbix_sender.
aleksei@dm:$ ./zabbix_sender -z127.0.0.1 -p20001 -s'Zabbix server' -ktrap -o'value'
sent: 1; skipped: 0; total: 1
aleksei@dm:$