B4J Question Best tutorial for relay server

Arf

Well-Known Member
Licensed User
Longtime User
I’m new to cloud dev and b4j, but I need to create a server app that clients can connect to and identify themselves, and the app will pair up pairs of clients that have matching serial numbers and simply pass bidirectional data between the pairs.
There are quite a few server tutorials and I don’t know which is best for me to start with. One of the paired clients will be from a b4a app (so if a simple b4a app forms part of the tutorial that would be grand), and the other side is a c# windows application. I guess it would be trivial enough to implement the c# side, I don’t know if there’s any advantage (or possible) to use B4J to create some sort of DLL on that side. Actually if the pc side app could establish the link and present a virtual com port on the pc, that would be fantastic as it would mean no change to my larger pc application, but I gather presenting a virtual com port would be quite challenging to code up.
Thanks for any pointers to a good starting point.
 

Arf

Well-Known Member
Licensed User
Longtime User
This is the tutorial that I thought might be best to start with, just confirming 😁

 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
  • Like
Reactions: Arf
Upvote 0

Arf

Well-Known Member
Licensed User
Longtime User
Thanks, I ended up starting with the MQTT tutorial, I've modified it a bit so the B4J app is the broker and I'm adding code to link the correct Android client with the correct PC client to pass data between them. I still have to write the PC side client though.
My question is, do you think I am better off adding to my C# project using a library like MQTTnet, or or there a way I can write it in B4J and invoke that binary and get data in and out of it? Apologies in advance for asking what sounds like a stupid question, I am keen to learn if I can incorporate B4J compilations into C# as it would make my life easier but I am not really a Windows programmer so I'm unsure of the hows and ifs.
 
Upvote 0

Arf

Well-Known Member
Licensed User
Longtime User
I ended up adding MQTTdotnet into a small c# client test project and I can connect to and exchange data with my B4A client.
Life is good! Thanks so much or this great start.
 
Upvote 0
Top