i have a question regarding KTOR, is there any way...
# ktor
j
i have a question regarding KTOR, is there any way to plugin in an engine that implements a non-HTTP protocol? KTOR looks really nice and i'd like it to be able to support a request/response framework that is proprietary.
d
Hmm, is this for what I think it's for? 😄
j
most likely yes 🙂
h
Sure, "just" create you own engine and put the instance in the
embeddedServer(yourEngine)
. Alternative you could use the classpath resolving to use HOCON files.
j
yeah i was raeding through https://ktor.io/docs/custom-engines.html#applicationengine-api but it isn't apparent whether, engines are protocol agnostic?
d
I feel like a lot of Ktor is centred around http, once you do any custom protocol like some proprietary application service framework, you lose a lot of the Ktor features.
j
yeah that's what i'm trying to figure out, whether or not pipelines are protocol agnostic, if they are that'd be nice
d
Ahh it's that bit you care about. Yeah that's agnostic afaik.
In addition to HTTP ktor has websockets so non-http is doable for sure.
h
According to the docs: Some engines can support other connector types, hence not an enum.
So you should be able to implement it
m
And you can work with just raw sockets as well: https://ktor.io/docs/servers-raw-sockets.html#server