title: how connect to socket in swift to read data and write it
body: <p>how to create a socket in swift that listen to and write on it? Is GCDAsyncSocket a right way or another way is possible? I used CFStreamCreatePairWithSocketToHost to connect to socket but can not read data from.</p>