-
Notifications
You must be signed in to change notification settings - Fork 0
Easy client server stub with protobuf
License
Gianluk92/ClientServer_with_Protobuf
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
////////////////////////////////////////////////////////// **** Mini-ORB based auto-generation of server/client **** **** stub and Protobuf support **** ////////////////////////////////////////////////////////// ----------- TEST.PBC INTERFACE FILE EXAMPLE -------------- ***** Is necessary maintain the same sintax ***** ---------------------------------------------------------- -- -- message myproto { -- -- optional sint32 a = 1 ; -- -- optional sint32 b = 2 ; -- -- optional sint32 c = 3 ; -- -- }; -- -- -- -- interface test -- -- { -- -- myproto sum( myproto num1, myproto num2); -- -- int prod( int num1, int num2); -- -- }; -- ////////////////////////////////////////////////////////// The interface must exist and be unique, and contain all the functions that you need. The message may be write, if you require some particular structures, otherwise you can skip it. Steps for execution: 1. Write "namefile.pbc" file with needed interface 2. ./parser "namefile.pbc" 3. A new folder named "AutoGenerated" is create 4. cd AutoGenerated 5. Write a simple server/client 6. make 7. ./server [default port 8000] 8. ./client [default port 8000, and local connection] For change default port and hostname use the additional costructor: ----- Server(char* port) ----- Client(char* hostname, char* port) For the example two preconfigured files Client and server are provided within the parser. In the example you can use: ./server [port] ./client [ip_addr] [port] multi-client is supported no multi-threading server There isn't necessity of recompile parser from the user, for this reason the make file is not furnished. For recompile the parser execute: g++ parser.cc -std=c++11 -o parser PROJECT CREATED BY GIULIA FERRI AND GIANLUCA GIUFFRIDA
About
Easy client server stub with protobuf
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published