[Help Wanted] Connection Handshake
kyranet opened this issue · comments
Aura commented
Describe the proposal
Currently, Veza resolves Node#connectTo
way early:
Process A:
NodeSocket
CallsSocket#connect
.Socket
emits private connect, resolving the internal promise.NodeSocket
emitsclient.ready
.Node#connectTo
resolves.
Process B:
NodeServer
receives connection, creating aNodeServerClient
.NodeServerClient
listens to all internal events, sendsIdentify
packet.NodeServerClient
receives Process A'sNodeSocket
's name as a response forIdentify
.NodeServerClient
emitsclient.identify
.
The ideal way is, Node#connectTo
should send the Identify
packet, not the NodeServerClient
, so both ends have their respective names.
This would also remove the parameter name
from Node#connectTo
, as it will be retrieved from the handshake.
Charalampos Fanoulis commented
I'm studying/searching for ways to implement this.
Charalampos Fanoulis commented
Yeah im still doing this, just trying to find my way thru the spaghetti