4 |
4 |
5 local xmlns_jingle_ibb = "urn:xmpp:jingle:transports:ibb:1"; |
5 local xmlns_jingle_ibb = "urn:xmpp:jingle:transports:ibb:1"; |
6 local xmlns_ibb = "http://jabber.org/protocol/ibb"; |
6 local xmlns_ibb = "http://jabber.org/protocol/ibb"; |
7 assert(base64.encode("This is a test.") == "VGhpcyBpcyBhIHRlc3Qu", "Base64 encoding failed"); |
7 assert(base64.encode("This is a test.") == "VGhpcyBpcyBhIHRlc3Qu", "Base64 encoding failed"); |
8 assert(base64.decode("VGhpcyBpcyBhIHRlc3Qu") == "This is a test.", "Base64 decoding failed"); |
8 assert(base64.decode("VGhpcyBpcyBhIHRlc3Qu") == "This is a test.", "Base64 decoding failed"); |
9 local t_concat = table.concat |
|
10 |
9 |
11 local ibb_conn = {}; |
10 local ibb_conn = {}; |
12 local ibb_conn_mt = { __index = ibb_conn }; |
11 local ibb_conn_mt = { __index = ibb_conn }; |
13 |
12 |
14 local function new_ibb(stream) |
13 local function new_ibb(stream) |