def recv_msg(sock):
    data = recv(sock, struct.calcsize(METHOD_STRUCT_FORMAT))
    method, = struct.unpack(METHOD_STRUCT_FORMAT, data)
    data = recv(sock, struct.calcsize(SIZE_STRUCT_FORMAT))
    size, = struct.unpack(SIZE_STRUCT_FORMAT, data)
    data = recv(sock, size)
    msg = pickle.loads(data)
    return method, msg
Receives a method and message from the socket.  This function blocks the
dataset/ETHPy150Open what-studio/profiling/profiling/remote/__init__.py/recv_msg