Andreas, Randal,
===================================== Randal wrote:
Not sure in the windows world, but by design, sockets closed are held closed for two minutes in case late packets arrive. If you don't care about that you can set "socket reuse" on the socket before you close it. *---------------------------------------------------------------------
By that, do you mean something like "socket setOption: 'SO_REUSEADDR' value: true." that I just found in the image? There is also an SO_REUSEPORT which is probably more what I want. I will read up on them shortly.
Of course, there is Andreas' example which appears to suggest that there is no problem. All I remember is that I had problems, got conflicting advice, and ultimately found ephemeral ports solved my immediate (at the time) problem at the expense of some work and firewall hassles. I suspect the reuse options are the answer.
Thanks for the pointers!!!
Bill
Wilhelm K. Schwab, Ph.D. University of Florida Department of Anesthesiology PO Box 100254 Gainesville, FL 32610-0254
Email: bschwab@anest.ufl.edu Tel: (352) 846-1285 FAX: (352) 392-7029
The unix like systems support these items, subject of much debate a few years back.
static socketOption socketOptions[]= { { "SO_DEBUG", SOL_SOCKET, SO_DEBUG }, { "SO_REUSEADDR", SOL_SOCKET, SO_REUSEADDR }, { "SO_DONTROUTE", SOL_SOCKET, SO_DONTROUTE }, { "SO_BROADCAST", SOL_SOCKET, SO_BROADCAST }, { "SO_SNDBUF", SOL_SOCKET, SO_SNDBUF }, { "SO_RCVBUF", SOL_SOCKET, SO_RCVBUF }, { "SO_KEEPALIVE", SOL_SOCKET, SO_KEEPALIVE }, { "SO_OOBINLINE", SOL_SOCKET, SO_OOBINLINE }, { "SO_LINGER", SOL_SOCKET, SO_LINGER }, { "IP_TTL", SOL_IP, IP_TTL }, { "IP_HDRINCL", SOL_IP, IP_HDRINCL }, { "IP_MULTICAST_IF", SOL_IP, IP_MULTICAST_IF }, { "IP_MULTICAST_TTL", SOL_IP, IP_MULTICAST_TTL }, { "IP_MULTICAST_LOOP", SOL_IP, IP_MULTICAST_LOOP }, #ifdef IP_ADD_MEMBERSHIP { "IP_ADD_MEMBERSHIP", SOL_IP, IP_ADD_MEMBERSHIP }, { "IP_DROP_MEMBERSHIP", SOL_IP, IP_DROP_MEMBERSHIP }, #endif { "TCP_MAXSEG", SOL_TCP, TCP_MAXSEG }, { "TCP_NODELAY", SOL_TCP, TCP_NODELAY }, #ifdef SO_REUSEPORT { "SO_REUSEPORT", SOL_SOCKET, SO_REUSEPORT }, #endif
On Feb 29, 2008, at 4:38 PM, Bill Schwab wrote:
Andreas, Randal,
===================================== Randal wrote:
Not sure in the windows world, but by design, sockets closed are held closed for two minutes in case late packets arrive. If you don't care about that you can set "socket reuse" on the socket before you close it. *---------------------------------------------------------------------
By that, do you mean something like "socket setOption: 'SO_REUSEADDR' value: true." that I just found in the image? There is also an SO_REUSEPORT which is probably more what I want. I will read up on them shortly.
Of course, there is Andreas' example which appears to suggest that there is no problem. All I remember is that I had problems, got conflicting advice, and ultimately found ephemeral ports solved my immediate (at the time) problem at the expense of some work and firewall hassles. I suspect the reuse options are the answer.
Thanks for the pointers!!!
Bill
Wilhelm K. Schwab, Ph.D. University of Florida Department of Anesthesiology PO Box 100254 Gainesville, FL 32610-0254
Email: bschwab@anest.ufl.edu Tel: (352) 846-1285 FAX: (352) 392-7029
-- = = = ======================================================================== John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com = = = ========================================================================
squeak-dev@lists.squeakfoundation.org