Socket descriptors are being closed now.
Some code for FrokAPI added.