original_docstring:  Securely obtain shares of n values input by a client 
docstring: Securely obtain shares of n values input by a client
docstring_tokens: Securely obtain shares of n values input by a client
code: def receive_from_client(cls, n, client_id, message_type=ClientMessageType.NoType):
          """ Securely obtain shares of n values input by a client """
          # send shares of a triple to client
          triples = list(itertools.chain(*(sint.get_random_triple() for i in range(n))))
          sint.write_shares_to_socket(client_id, triples, message_type)
  
          received = cint.read_from_socket(client_id, n)
          y = [0] * n
          for i in range(n):
              y[i] = received[i] - triples[i * 3]
          return y
code_tokens: def receive_from_client ( cls , n , client_id , message_type = ClientMessageType . NoType ) : triples = list ( itertools . chain ( * ( sint . get_random_triple ( ) for i in range ( n ) ) ) ) sint . write_shares_to_socket ( client_id , triples , message_type ) received = cint . read_from_socket ( client_id , n ) y = [ 0 ] * n for i in range ( n ) : y [ i ] = received [ i ] - triples [ i * 3 ] return y
short_docstring: Securely obtain shares of n values input by a client
short_docstring_tokens: Securely obtain shares of n values input by a client
comment: """ Securely obtain shares of n values input by a client """$SEP$# send shares of a triple to client