Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
rooter #1
Member since Aug 2018 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Send Messages between two Servers and Clients
Hi,

I have a problem figuring out how to send messages between two clients on two different servers, all of them are self-written using the examples found in https://gitlab.com/matrix-xmpp/samples.

I know there is a static "Global"-class in the samples which holds a list of XmppServerConnections. But this "List" only knows the connection of its server itself, not the other one; which is correct, because the two servers and clients are seperate processes, why should they know eachother without telling them.

So how do I connect Client A and Server A to Server B and Client B?
Is there something like a "XMPP-Server-Service resolver" if I have the IP and Port Server A and B are bound to?
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

are you referring to the server example?
This sample does not implement server to server connections. When messages between 2 different servers (xmpp domains) need to be sent, then servers create a server to server connection (s2s) between each other.
Those connection are described in the XMPP core protocols and extensions.

See also:

Why are bot using existing server software like Openfire, ejabberd, Prosody, Tigase and others? They have all implemented those features and run out of the box.

Alex
Avatar
rooter #3
Member since Aug 2018 · 2 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

Using existing server software like the one you mentioned is something I want to avoid. I want to have my very own lightweight Client and Server.

Am I right that I have to implement s2s by myself and there is no function in the Matrix SDK?
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by rooter:
Am I right that I have to implement s2s by myself and there is no function in the Matrix SDK?

yes, you have to implement it yourself. Its very similar to the client 2 server connection (c2s). All primitives you need are already in MatriX.
If you want to write your own server then I highly suggest to use MatriX vNext for it.

See also:
https://github.com/matrix-xmpp/matrix-vnext/tree/master/ex…

Alex
This post was edited on 2018-08-06, 14:17 by Alex.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: