ID:2204589
 
Applies to:Dream Daemon
Status: Open

Issue hasn't been assigned a status value.
Lets imagine we have server A and server B that want to keep in communication with each other.
Server A does this:
world.Export("byond://B:1234?Hello!", null, 1)

Server B receives it in /world/Topic, returns a reply, and thats that.

Lets say server B has something happen that it wants to let A know about
world.Export("byond://A:1234?player_death=billybobbyjoe", null, 1)

This will result in a second socket being opened.

I suggest that the existing socket be used (the one A initiated for A->B communication).
Given that the port number is sent through the sockets I don't see it being too far of a difficulty to implement.
Problem: Server A can cut off the socket at any time, by sending persist=0. Server B can't know this or anticipate when it will happen, so the only way to handle this would be via some kind of farewell handshake protocol.
Well if the socket ever closes (detected eg by B failing a write), B can open its own persist socket. A way to vet these connections wouldn't be a bad idea though.