Skip to content

Transport Documentation

Adam Janin edited this page May 3, 2016 · 3 revisions

Transport Example

The following is a minimal two-way chat example. In one shell, call minchat.py chat1 chat2. In another shell, call minchat.py chat2 chat1.

import sys
from nluas.Transport import Transport

myname = sys.argv[1]
remotename = sys.argv[2]

t = Transport(myname)
t.subscribe(remotename, lambda tuple: print('Got', tuple))

while True:
    t.send(remotename, input())

Transport API

Clone this wiki locally