If you want to go over a screen session instead of netcat:

Code:
(base) homepc@home-pc:~$ screen -S cod2 -p 0 -X hardcopy ~/tmp_screen.txt; tail -n2 ~/tmp_screen.txt
Server is not running.