import os from simplerpc.marshal import Marshal from simplerpc.future import Future point3 = Marshal.reg_type('point3', [('x', 'double'), ('y', 'double'), ('z', 'double')]) class BenchmarkService(object): FAST_PRIME = 0x5b9365eb FAST_DOT_PROD = 0x4a92c615 FAST_ADD = 0x484806bf FAST_NOP = 0x4f29b7a5 PRIME = 0x1f96b90f DOT_PROD = 0x3a2fd47a ADD = 0x5135fabc NOP = 0x3823ed06 SLEEP = 0x39d768e9 ADD_LATER = 0x64e0a594 LOSSY_NOP = 0x5323ea07 FAST_LOSSY_NOP = 0x6223e760 __input_type_info__ = { 'fast_prime': ['rpc::i32'], 'fast_dot_prod': ['point3', 'point3'], 'fast_add': ['rpc::v32', 'rpc::v32'], 'fast_nop': ['std::string'], 'prime': ['rpc::i32'], 'dot_prod': ['point3', 'point3'], 'add': ['rpc::v32', 'rpc::v32'], 'nop': ['std::string'],
import os from simplerpc.marshal import Marshal from simplerpc.future import Future empty_struct = Marshal.reg_type('empty_struct', []) Person = Marshal.reg_type('Person', [('id', 'rpc::i32'), ('name', 'std::string'), ('email', 'std::string')]) complex_struct = Marshal.reg_type('complex_struct', [( 'd', 'std::map<std::pair<std::string, std::string>, std::vector<std::vector<std::pair<std::string, std::string>>>>' ), ('s', 'std::set<std::string>'), ('e', 'empty_struct')]) class EmptyService(object): __input_type_info__ = {} __output_type_info__ = {} def __bind_helper__(self, func): def f(*args): return getattr(self, func.__name__)(*args) return f def __reg_to__(self, server): pass
import os from simplerpc.marshal import Marshal from simplerpc.future import Future empty_struct = Marshal.reg_type('empty_struct', []) complex_struct = Marshal.reg_type('complex_struct', [('d', 'std::map<std::pair<std::string, std::string>, std::vector<std::vector<std::pair<std::string, std::string>>>>'), ('s', 'std::set<std::string>'), ('e', 'empty_struct')]) class EmptyService(object): __input_type_info__ = { } __output_type_info__ = { } def __bind_helper__(self, func): def f(*args): return getattr(self, func.__name__)(*args) return f def __reg_to__(self, server): pass class EmptyProxy(object): def __init__(self, clnt): self.__clnt__ = clnt class MathService(object): GCD = 0x67d710ba
import os from simplerpc.marshal import Marshal from simplerpc.future import Future empty_struct = Marshal.reg_type('empty_struct', []) Person = Marshal.reg_type('Person', [('id', 'rpc::i32'), ('name', 'std::string'), ('email', 'std::string')]) complex_struct = Marshal.reg_type('complex_struct', [('d', 'std::map<std::pair<std::string, std::string>, std::vector<std::vector<std::pair<std::string, std::string>>>>'), ('s', 'std::set<std::string>'), ('e', 'empty_struct')]) class EmptyService(object): __input_type_info__ = { } __output_type_info__ = { } def __bind_helper__(self, func): def f(*args): return getattr(self, func.__name__)(*args) return f def __reg_to__(self, server): pass class EmptyProxy(object): def __init__(self, clnt): self.__clnt__ = clnt class MathService(object):
import os from simplerpc.marshal import Marshal from simplerpc.future import Future point3 = Marshal.reg_type('point3', [('x', 'double'), ('y', 'double'), ('z', 'double')]) class BenchmarkService(object): FAST_PRIME = 0x5b9365eb FAST_DOT_PROD = 0x4a92c615 FAST_ADD = 0x484806bf FAST_NOP = 0x4f29b7a5 PRIME = 0x1f96b90f DOT_PROD = 0x3a2fd47a ADD = 0x5135fabc NOP = 0x3823ed06 SLEEP = 0x39d768e9 ADD_LATER = 0x64e0a594 LOSSY_NOP = 0x5323ea07 FAST_LOSSY_NOP = 0x6223e760 __input_type_info__ = { 'fast_prime': ['rpc::i32'], 'fast_dot_prod': ['point3','point3'], 'fast_add': ['rpc::v32','rpc::v32'], 'fast_nop': ['std::string'], 'prime': ['rpc::i32'], 'dot_prod': ['point3','point3'], 'add': ['rpc::v32','rpc::v32'], 'nop': ['std::string'], 'sleep': ['double'], 'add_later': ['rpc::i32','rpc::i32'],