Skip to content

Instantly share code, notes, and snippets.

@voluntas
Created July 17, 2012 16:05
Show Gist options
  • Save voluntas/3130310 to your computer and use it in GitHub Desktop.
Save voluntas/3130310 to your computer and use it in GitHub Desktop.
yet-another-msgpackrpc-client
-type type() :: tcp | udp | sctp.
-type name() :: atom().
-type args() :: [msgpack:msgpack_term()].
%% シングルコネクション
-spec msgpackrpc_client:connect(type(), inet:ip_address(), inet:port_number()) -> {ok, pid()} | {error, term()}.
-spec msgpackrpc_client:close(pid()) -> ok | {error, term()}.
-spec msgpackrpc_client:sync_call(pid(), name(), args()) -> {ok, any()} | {error, term()}.
-spec msgpackrpc_client:sync_call(pid(), name(), args(), timeout()) -> {ok, any()} | {error, term()}.
-spec msgpackrpc_client:async_call(pid(), name(), args()) -> ok | {error, term()}.
-spec msgpackrpc_client:async_call(pid(), name(), args(), timeout()) -> ok | {error, term()}.
-spec msgpackrpc_client:join(pid()) -> {ok, any()} | {error, term()}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment