TCP server for localhost only

Hello, I want to use Windows port of FreeRTOS and have a question.

Is it possible to create a simple TCP server under FreeRTOS without using standard FreeRTOS TCP library?

I just need a local server for communication with a software running on the same PC, so it will be very difficult to recompile the code every time to define the right ethernet interface just to start it on another PC.

I would take a simple implementation with Win sockets, but I suspect it’s not thread-safe, so is there a real possibility to simplify the TCP connection using FreeRTOS?

Thank you in advance!

Hello,

I don’t find similar example with Windows port. We will be looking further into this question and update in this thread later. Thank you for your patience.

You can use FreeRTOS+TCP from within a WinSim application. You will not need WinSock.

( You can not use WinSock in an FreeRTOS application )

The WinSim application will not access an Ethernet adapter, it uses WinPCAP in stead. So I see no need to keep on recompiling it.

Your WinSim application will be able to communicate with any other program or device.

Does that answer your question?

No, I don’t think so.
This is what is in the manual for examples on Windows:
The following are required to build and run the Win32 RTOS port examples:
- A windows host computer with a connected Ethernet network port (see the hardware setup section below). The projects have been tested with Windows XP, Windows 7 and Windows 10.

I don’t want to play with number of the ethernet interface (it’s pretty difficult to find the right one novadays), I don’t want to install WinPcap everywhere I use the simulator, I just want to use localhost (127.0.0.1) to make it as simple as possible for another application. Am I asking for too much?

Have you looked at configNETWORK_INTERFACE_TYPE_TO_USE which removes the need of finding the correct interface number.