Created
April 27, 2012 09:42
-
-
Save l04m33/2507869 to your computer and use it in GitHub Desktop.
a callback server - header file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-ifndef(__GEN_CALLBACK_SERVER_HRL__). | |
-define(__GEN_CALLBACK_SERVER_HRL__, 1). | |
-type process_ref() :: pid() | {atom(), node()}. | |
-type server_ref() :: pid() | {{local, atom()} | {global, term()} | {via, module(), term()}, node()}. | |
-define(RECEIVE_CB, (fun gen_callback_server:receive_cb/2)). | |
-define(REPLY_CB, (fun gen_callback_server:reply_cb/1)). | |
-define(CLIENT_REPLY_CB, (fun gen_callback_server:client_reply_cb/1)). | |
-define(MIXED_REPLY_CB, (fun gen_callback_server:mixed_reply_cb/1)). | |
-record(cb_event, | |
{ | |
reply_to = none :: process_ref() | none, | |
cb_arg = none :: any(), | |
msg_ref = none :: reference() | none, | |
sent_from = none :: server_ref() | none, | |
context = none :: any() | |
}). | |
-endif. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment