Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: RE: Possible to close a TCP/IP socket in asyn?
From: Mark Rivers <rivers@cars.uchicago.edu>
To: Adam Bark <Adam.Bark@diamond.ac.uk>, "'tech-talk@aps.anl.gov'" <tech-talk@aps.anl.gov>
Date: Wed, 22 Oct 2014 20:51:19 +0000
Hi Adam,

> I have tried disconnecting the asyn port and asynManager's freeAsynUser.

A frequent source of confusion is that the word "disconnect" is used in 2 completely different contexts in asyn.  The first is asynManager::disconnect, the second is asynCommon::disconnect.

This is the documentation for pasynManager->disconnect
*************************************************
Disconnect the asynUser from the port,addr to which it is connected via a previous call to connectDevice. The call will fail if the asynUser is queued or locked, or has a callback registered via exceptionCallbackAdd.  Note that asynManager:disconnect and asynCommon:disconnect are completely different.
*************************************************

This is the documentation for pasynManager->disconnect
*************************************************
Disconnect from the hardware device or communication path. The queueRequest must specify priority asynQueuePriorityConnect.
*************************************************

You said you "tried disconnecting the asyn port" and that did not work.  I suspect that perhaps you called pasynManager::disconnect?  All that does is to remove the association of that asynUser structure with a particular port and address.  It does not cause the underlying device to be disconnected from asyn, e.g. closing a socket.  The reason is simple: there could be many such asynUser structures associated with that port,addr.  This provides a way to re-use the asynUser structure to be connected to another port and address.

asynCommon::disconnect causes the port to be disconnected from the device itself, e.g. to close the socket.

Mark

____________________________________
From: tech-talk-bounces@aps.anl.gov [tech-talk-bounces@aps.anl.gov] on behalf of Adam Bark [Adam.Bark@diamond.ac.uk]
Sent: Wednesday, October 22, 2014 2:30 PM
To: 'tech-talk@aps.anl.gov'
Subject: Possible to close a TCP/IP socket in asyn?

Is it possible to close a socket created with drvAsynIPPortConfigure? I
have tried disconnecting the asyn port and asynManager's freeAsynUser.

Thanks,
Adam.

--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom






Replies:
Re: Possible to close a TCP/IP socket in asyn? Adam Bark
References:
Possible to close a TCP/IP socket in asyn? Adam Bark

Navigate by Date:
Prev: Re: PV monitoring and email reporting tool Maren Purves
Next: RE: Discussion about licenses, copyrights, business, and source code Andrew Rhyder
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
Navigate by Thread:
Prev: Re: Possible to close a TCP/IP socket in asyn? Mark Rivers
Next: Re: Possible to close a TCP/IP socket in asyn? Adam Bark
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·