Author Topic: Question involving client messaging  (Read 2273 times)

But then he needs to forward ports
somebody has to forward ports all the way around

the host of the server the two players are on
ephialties, rtb host
the guy using the mod
purple metro

big whoop, it's not hard.

I'm about to code a relay chat server so mods like this can use a dependency, I've had multiple ideas that require one and I've been too lazy to do it but I may as well since other people could use it too.

I'm about to code a relay chat server so mods like this can use a dependency, I've had multiple ideas that require one and I've been too lazy to do it but I may as well since other people could use it too.
praise the lord

God, that took a while to get asynchronous sockets working in C++. I've never done that before. Anyway, I figured I'd post so you can post protocol ideas but I figured it'd go something like this:

client1 requests interaction with BL_ID of client2
client2 accepts interaction request
client1 can now send data to client2's BL_ID
client2 can send data to client1's BL_ID

in this scenario, BL_ID would be a replacement for IP that the server substitutes. Also, if it wasn't clear I'll be hosting this off my server so anyone can use it simply by connecting and working with the protocol.

God, that took a while to get asynchronous sockets working in C++. I've never done that before. Anyway, I figured I'd post so you can post protocol ideas but I figured it'd go something like this:

client1 requests interaction with BL_ID of client2
client2 accepts interaction request
client1 can now send data to client2's BL_ID
client2 can send data to client1's BL_ID

in this scenario, BL_ID would be a replacement for IP that the server substitutes. Also, if it wasn't clear I'll be hosting this off my server so anyone can use it simply by connecting and working with the protocol.
hallelujia

God, that took a while to get asynchronous sockets working in C++. I've never done that before. Anyway, I figured I'd post so you can post protocol ideas but I figured it'd go something like this:

client1 requests interaction with BL_ID of client2
client2 accepts interaction request
client1 can now send data to client2's BL_ID
client2 can send data to client1's BL_ID

in this scenario, BL_ID would be a replacement for IP that the server substitutes. Also, if it wasn't clear I'll be hosting this off my server so anyone can use it simply by connecting and working with the protocol.
that handles the connection, you would probably ban us or something for running a webserver with it, wouldn't you

that handles the connection, you would probably ban us or something for running a webserver with it, wouldn't you
No, but I don't see a way you could run a webserver on it because web browsers don't have BL_IDs and the server won't run off port 80.

Also, I'm almost done with it. Just ironing out a few bugs with auth server authentication and then it should be good to go.
« Last Edit: December 23, 2012, 12:52:03 PM by Trinick! »

If possible, is there any other way to do this without the need of TCPObjects? I've never experimented with them or used them, and I would like to never use them in the future. But if push comes to shove then I guess i'll try to use them. But seriously, is there any other way?

If possible, is there any other way to do this without the need of TCPObjects? I've never experimented with them or used them, and I would like to never use them in the future. But if push comes to shove then I guess i'll try to use them. But seriously, is there any other way?
no

learn to use them, they are the threads that hold the planet together

no

learn to use them, they are the threads that hold the planet internet together

If possible, is there any other way to do this without the need of TCPObjects? I've never experimented with them or used them, and I would like to never use them in the future. But if push comes to shove then I guess i'll try to use them. But seriously, is there any other way?
All networking in torque has to be done with TCP objects. Sorry man, but they are not hard to use at all.

Code: [Select]
function TCPObject::onLine(%this, %line)
{
//handle incoming data
}
%TCP = new tcpObject();
%website = "somewebsite.com";
%port = "1212";
%TCP.connect(%website @ ":" @ %port);
%TCP.send("send whatever data you want");
%TCP.disconnect();
%TCP.delete();

Be glad you're using Torque, this is my C++ networking code for the server I'm 90% done making.

http://pastebin.com/uGkvDZfb
« Last Edit: December 23, 2012, 05:47:32 PM by Trinick! »

262 lines? that's not so bad...

262 lines? that's not so bad...
It's not the line count that's bad, it's the highly specific requirements of each function that make using sockets extremely complicated.