Data Sheet

dScript
dScript User Manual v2.15
Here is a simple tcp/ip server example which just increments the first byte of the message and
sends it back to the client.
tcpip.ip "192.168.0.136"
tcpip.mask "255.255.255.0"
tcpip.port 17494
var tcpLength
string tcpBuf[1024]
thread TcpipExample tcpip
TcpipExample:
tcpip.Read(tcpBuf, tcpLength)
tcpbuf[0] = tcpbuf[0] + 1
tcpip.Write(tcpBuf, tcpLength)
threadsuspend
main:
threadstart TcpipExample
threadsuspend
Copyright © 2016, Devantech Ltd.
All rights reserved.
www.robot-electronics.co.uk
35