implement: partial reading from socket