If your application can communicate using raw TCP/UDP sockets, it is much easier to implement. You don't have to deal with parsing HTML headers etc.
For testing raw TCP/UDP sockets, the Linux utility nc works very well. The following creates a server on your Linux PC listening on port 8080
root@srv:~# nc -k -l -N -v 8080
You can even "visit" the page by pointing your browser to it
http://ip_address:8080
