http://www.oreillynet.com/pub/faqs/a...uplicateSocket