October 2018
Intermediate to advanced
420 pages
10h 26m
English
The TCP client is also implemented as a Cyclotron driver. Its behavior is similar to that of the server: it takes the similar Sink observables as input and returns similar Source observables. The following example shows the types used by this driver:
Sink = namedtuple('Sink', ['request'])Source = namedtuple('Source', ['response'])# Sink itemsConnect = namedtuple('Connect', ['host', 'port'])Write = namedtuple('Write', ['id', 'data'])# Source itemsConnection = namedtuple('Connection', ['id', 'observable'])Data = namedtuple('Data', ['data'])
The only difference is the Listen sink item that is replaced with a Connect item, taking the same arguments. The meaning however is different: the Listen item on the TCP server ...
Read now
Unlock full access