semlanik / qtprotobuf

Protobuf generator and bindings for Qt framework
https://semlanik.github.io/qtprotobuf
MIT License
169 stars 38 forks source link

How to Generate Server Code #240

Open Meneleus opened 3 years ago

Meneleus commented 3 years ago

I used the ZIP version and setup a project with a simple proto file. Generated code with:

protoc --plugin=protoc-gen-qtprotobuf=..\bin\qtprotobufgen.exe --qtprotobuf_out=generated -I. project.proto

However, the generated code only has Client code, there is no server implementation. What do I need to do to generate server code?

Thank You!

semlanik commented 3 years ago

Sad to say, but it's still TBD: https://github.com/semlanik/qtprotobuf/issues/34

Meneleus commented 3 years ago

Ahh! So, how does this example:

https://github.com/semlanik/qtprotobuf/tree/master/examples/simplechatserver

work?

semlanik commented 3 years ago

There is a server that is implemented using the reference C++ API, but be aware that it needs improvements, so if you decide use it as an example for your own, take a closer look at use of a connection queue and the memory leaks that it introduces there.

Meneleus commented 3 years ago

Got ya, that's too bad, I was hoping to use this for a server implementation in Qt.