Cookbook Example
How can I...?
Examples 12 : Simple TCP based client for the streamer above. Components used: pipeline, TCPClient, SimpleFileWriter
#!/usr/bin/pythonSource: Examples/example12/ClientStreamToFile.py
from Kamaelia.Internet.TCPClient import TCPClient
from Kamaelia.Util.PipelineComponent import pipeline
from Kamaelia.File.Writing import SimpleFileWriter
outputfile = "/tmp/received.raw"
clientServerTestPort=1500
pipeline(TCPClient("127.0.0.1",clientServerTestPort),
SimpleFileWriter(outputfile)
).run()
(C) 2006 Kamaelia Contributors, including the British Broadcasting Corporation, All Rights Reserved, This is an ongoing community based development site. As a result the contents of this page is the opinions of the contributors of the pages involved not the organisations involved. Specificially, this page may contain personal views which are not the views of the BBC.