Skip to content
Patrick Hammer edited this page Feb 25, 2020 · 14 revisions

Start the UDPNAR with:

./NAR UDPNAR 127.0.0.1 50000 100000 true

Now any client can send Narsese to this instance. Example with nc:

echo "<a --> b>." | nc -u 127.0.0.1 50000

Example with Python:

import socket
ip = "127.0.0.1"
port = 50000
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
def NAR_AddInput(input):
    sock.sendto((input+'\0').encode(), (ip, port))

NAR_AddInput("<(*,toothbrush,plastic) --> made_of>. :|:")
Clone this wiki locally