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
%% @author bokner | |
%% @doc Implementation of function call with recovery | |
-module(recovery_test). | |
%% ==================================================================== | |
%% API functions | |
%% ==================================================================== | |
-export([test/1]). |
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
#!/usr/bin/env escript | |
main([]) -> | |
{ok, Client} = gen_client:start("[email protected]", "localhost", 5222, "password"), | |
%% We can add any number of handlers (callbacks) to the session | |
%% Message handler | |
gen_client:add_handler(Client, | |
fun(#received_packet{packet_type = message, type_attr = "chat", from = Jid}, _Session) -> |
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
%% Author: bokner | |
%% Created: Apr 10, 2010 | |
%% Description: HTTP digest authentication | |
%% Note: the code follows the informal explanation given on Wikipedia. | |
%% Note: the test/0 function doesn't intend to send a proper data to webdav service, | |
%% it just shows how to pass the authorization. | |
%% Disclaimer: Use on your own risk. The author disclaims any liability | |
%% with regard to using this code. | |
-module(digest_auth). |
NewerOlder