I made some tests with a persistant tcp-connection to each owserver.
Patches needed to be done in ow_server.c/owserver.c and ow.h.

I added a while(1) loop in owserver.c:RealHandler() to allow multiple
requests within an open connection.
I didn't touch the ping-thread, and this still had the function to close an
idle connection.

ow_server.c:ServerRead/Dir/Write/Present() tries to used an already opened
connection if the busmode is bus_server.

In my case I couldn't see much improvement at all... Mostly because I had a
_SLOW_ DS9097U, and the all processes were started on the same network. I
hoped that I could poll the buttons on the 1-wire LCD much quicker, but it
was not very successful solution. It takes 0.4 seconds for me to read the
button-status, and that doesn't give very good feeling when pressing the
buttons and you expect something to happen on the screen at once.

I'm sure there could be some improvements when you have a fast 1-wire
adapter + the remote owserver is located far away.

My patch didn't work "perfect" when the ping-thread killed the connection
and a reconnection needed to be done, but it's just to work on a better
reconnection-code. Sometimes you have to do "ls /tmp/1wire/uncached/"
several times when the connection was closed after idling.

Take a look at the quick test-patch I made if you want:

http://home.mag.cx/owfs_keepalive_patch.txt

/Christian




> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:owfs-
> [EMAIL PROTECTED] On Behalf Of ziggy
> Sent: den 9 januari 2007 07:14
> To: [email protected]
> Subject: Re: [Owfs-developers] understanding owserver TCP connection
> behavior
> 
> 
> First, just a quick statement. I am only looking at the way owserver
> operates with a TCP connection. Please note that I am *not* suggesting
> a change to the owserver protocol itself, but the way it uses the TCP
> connections from clients. And now that I think about it, persistent
> connections makes sense between owservers too. I suppose the protocol
> could be extended to indicate that the client wishes a persistent
> connection, so nothing is broken for existing clients, but I digress.
> 




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to