A Transport
is responsible to transport the string or array buffer telegram via
a physical medium.
- SHOULD reconnect on connection failures.
connect
: Fired on first connect (initialization), reconnect (valid for client side transports, no need for server side handlers.)disconnect
data
-
write data, callback(error)
: callback will be fired when data is sent succesfully -
error
:null
for success, truthy value for error. -
is-connected!
: returns true or false according to current transport connection status. -
connect!
: method for initializing the medium (connect, dial, etc.)
-
DO: Unplug the physical connection, start the application. EXPECT: Transport should start trying to reconnect.
-
After
test#1
is OK, DO: Plug the physical connection. EXPECT: Transport should- connect immediately
- fire 'connect' event
-
After
test#2
is OK, DO: Unplug the physical connection. EXPECT: Transport should- start trying to reconnect
- fire 'disconnect' event
Currently the following transports are and/or planned to be implemented:
- TCP: A TCP transport layer which handles re-connection
- DCS-UDP: A DCS transport over UDP which will handle heartbeat, app level ACK, etc.
- Websocket
- Socket.io
- Serial Port (RS-232, RS-485, etc...)
- USB
- CanBus (hardware specific)
- SMS
- WebRTC
- EtherCAT