|
From: | Nikolas Karakotas |
Subject: | [lwip-users] Sockets |
Date: | Thu, 6 Sep 2012 08:35:07 +0300 |
Hello,
Im using the socket api to connect to a number of other embedded devices.
The protocol used is modbus but doesn’t really matter in this case.
Apparently the other embedded systems have some issues and cause problems
to the sockets. When I connect successfully to the devices and then collect data
for some reason when the transfer of data starts or maybe when I try to send
commands it doesn’t respond as the other device has got stuck or can respond to
modbus commands anymore (I can confirm this by using a tool).
I then get stuck as well maybe in the lwip_write or lwip_send. How can I
combat this issue? Does send/write wait for ever?
int opt = timeout;
int ret = lwip_write(s, q->payload, q->len);
ret = lwip_setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &opt,
sizeof(int));
ret = lwip_read(s, q->payload, q->tot_len);
Regards,
Nick |
[Prev in Thread] | Current Thread | [Next in Thread] |