For the communication of an application from device A to an application from device B it is necessary that there is some network or connection that connects both devices be it the Internet, Bluetooh, Wifi, connections via cables among others. But as you said not that you did not want to use Web Service or Server will be necessary, use one of the functionality wired, Bluetooh or Wifi. That’s why I recommend using a Server for this, since desktops do not have Wifi and older laptops also do not have this functionality. Already Bluetooh I won’t even mention since there are few laptops that have the functionality Bluetooh integrated and those who have let’s say so are unconventional for most of the population. Sorry if the answer is incomplete or not as desired, for min your question lacks some specific information
Socket?! bluetooth?! Wi-fi?! Telepathy?!
– viana