Home/Support/Support Forum/Trying to send a short message using TCP or UDP sockets and then read the short response through the same socket
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Trying to send a short message using TCP or UDP sockets and then read the short response through the same socket

0 votes
I am using Dynamic C V9.62 to develop on a BL2600 SBC.

Essentially, I want to open a socket to a remote instrument (IP:PORT), send a short message to that instrument, and then read the instrument's reply through the same socket. I am new to socket programming and none of the examples I tried gave me enough insight on how to do this.

Thanks in advance for any assistance.
asked Jul 2, 2015 in Rabbit Software by PatrickT New to the Community (0 points)

Please log in or register to answer this question.

2 Answers

0 votes
UDP Server: C:\DCRABBIT_10.72\Samples\tcpip\udp\UDP_SRV.C

UDP Client: C:\DCRABBIT_10.72\Samples\tcpip\udp\Udp_cli.c
answered Jul 5, 2015 by edha Community Contributor (71 points)
0 votes
A good example for TCP is the Modbus TCP Master and slave libraries which use small packets over TCP/IP. These can be found in the Lib\Rabbit4000\Modbus folder.

On the UDP side of things, the Dynamic C BACnet stack at http://bacrabbit.sourceforge.net/ uses UDP to send small to medium packets over UDP.
answered Jul 6, 2015 by petermcs Veteran of the Digi Community (1,128 points)
...