[En-Nut-Discussion] Sockets

Michael Baverso mbaverso at elcontech.com
Thu Jan 23 13:21:25 CET 2003


The protocol is Modbus/TCP. The Ethernut is acting as server, which
must be able to close on clients request. 
The specification for Modbus/TCP suggests keeping
sockets open to reduce handshake segments, it also states
the server should be able to respond to requests to
close from its client. The client software
I am using does as stated aboove, it sends multiple 
queries to the Ehernut Modbus/TCP server.

After sending original question I tried the following and
I have achieved some success(10 hrs test time)
with keeping the socket open with this:

pseudo code:

SetSockOpt(RCVTO, 3000);

while(sock->so_state != SO_CLOSEWAIT)
{
     if ProcessQuery() is not succesful(no socket rcv timeout etc)
        break;

Yield();
    }
Closesocket();
Yield();
        
----- Original Message ----- 
From: "Harald Kipp" <harald.kipp at egnite.de>
To: <en-nut-discussion at egnite.de>
Sent: Thursday, January 23, 2003 3:29 AM
Subject: Re: [En-Nut-Discussion] Sockets


> Can you please explain in more detail. Server or client?
> What protocol?
> 
> Harald
> 
> At 19:20 22.01.2003 -0500, you wrote:
> >Is there any way to keep a socket open for
> >multiple transactions until a request to close from
> >the remote host is received??
> >_______________________________________________
> >En-Nut-Discussion mailing list
> >En-Nut-Discussion at egnite.de
> >http://www.egnite.de/mailman/listinfo/en-nut-discussion
> 
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo/en-nut-discussion
> 



More information about the En-Nut-Discussion mailing list