-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
This is another runtime http related issue.
I think that there should be a way to add custom backends, because I had to access to many "private" properties while writing the http module for runtime. Maybe a class that provides default, overridable implementations of the methods? Something like:
const custom = new eshttp.HttpBackend({
server: (serverInterface) => {
return new SomeServer((socket) => {
socket.on('data', (data) => serverInterface.ondata(data));
socket.on('end', () => serverInterface.onend());
socket.on('close', () => serverInterface.onclose());
socket.on('error', (err) => serverInterface.onerror(err);
});
},
client: (clientInterface) => {
// ...
}
});
custom.close = (socket) => socket.someOtherNameForClose();
// everything else is left as defaultAnyway, it's just a proposal.
billiegoose
Metadata
Metadata
Assignees
Labels
No labels