Swift Tcp-socket Resources