Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP Example client / server code #39

Closed
sudhakarreddi opened this issue Jun 29, 2018 · 4 comments
Closed

TCP Example client / server code #39

sudhakarreddi opened this issue Jun 29, 2018 · 4 comments

Comments

@sudhakarreddi
Copy link

Hi All,

I am new to eRPC. Is there any example of client & server initialization code in C language, with erpc using TCP as transport mechanism ?

Can you please point me to the code, if it is readily available. I thank you for your support.

Regards,
Sudhakar

@kschuemann
Copy link

Hey,

same issue here. I also need to implement erpc using tcp (lwip on FreeRTOS). I would love to get some hints for implementing a example-Project.

Regards,
Kolja

@Hadatko
Copy link
Member

Hadatko commented Jul 3, 2018

Hi guys, these days i don't have much time (Vacations, others projects, wedding ;) ... ). So what i can suggest now is look on implementation of other transports in erpc/transports and erpc/setup folders. Tcp transport is currently only for using on Linux (this transport doesn't have C setup function in erpc/setup folder currently, but can be easily done when you look on other transports).
When you look into transports folder you will see that you basically need implement 2-3 functions (send, receive, init in C++ but simple). Then C implementation of calling this C++ functions are placed in setup folder. I don't see big issue to implement this with lwip or other tcp/ip stacks or other transports.
In init function you can implement socket initialization and connection and in send/receive you will call lwip send/receive functions. You could find some inspiration in Linux TCP ERPC implementation in tranports folder.

@kschuemann
Copy link

Hi Hadatko,

thanks for the hints. I will give it a try and give you feedback during process. Best wishes for the wedding.

Regards,
Kolja

@mentaal
Copy link
Contributor

mentaal commented Jul 4, 2018

I do have this pull request in place for a small piece of TCP initialization code if it helps:
#35

@Hadatko Hadatko closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants