Re: MessageSession approach
From: "Anatoly Gutnick" <anatolyg@xxxxxxxxx>
Date: Thu, 1 Feb 2007 09:43:28 +0100 (CET)
Jakob Schroeter wrote:

"Client::send() sends any XML over the wire to the server.
MessageSession::send() is limited to sending a single chat message to the
MessageSession's buddy."

Question:

*Does it mean MessageSession opens connection to the MessageSession's buddy
or it send it with XMPP over UDP?*
*And whats happens if MessageSession's buddy closed connection once?*
**
I tried such flow: test1 opened chat session using *MessageSession *and send
message to test2...
Then test2 closed connection to Jubber.
Test1 sends second message using Session:send() ...
The message was not deliveried (test2 disconnected), but after test2
reconnected to Jubber it gots the message.

*So, it looks that MessageSession:send also send message over Jubber server
- is it correct?*
*MessageSession Is only abstraction for easy using or it really communicate
in a different way?*


*3) MessageSession:*send( Tag *tag ) is protected.
I used client->send( Tag *tag  ) to pass attributes and childs - not only
message and body...

I am thinking about changes to do, but would like to understand if i really
need to use *MessageSession.*
**
*Thanks,*
*Anatoly*













2007/1/31, Jakob Schroeter <js@xxxxxxxxxx>:

Hi,

On Tue Jan 30 2007, Anatoly Gutnick wrote:
> Hello,
>
> What are the actual disadvantages of Client::send().
> Can you please explian the difference in implementation of Client:send
and
> MessageSession:send
> that makes the difference?

The 'disadvantage' of Client::send() is that it requires more work from
you to
achieve what you can do with a single call to MessageSession::send().

Client::send() sends any XML over the wire to the server.
MessageSession::send() is limited to sending a single chat message to the
MessageSession's buddy.

cheers,
Jakob


--
gloox-dev mailing list
to unsubscribe:
send a message with subject 'unsubscribe gloox-dev' to
minimalist@xxxxxxxxxx