Communication between two TCP servers in C++

Hello there,

My name is Andrea, I'm an engineering student.

I'm quite newbie with sockets. I'm trying to use the NativeEthernet library to implement a direct communication beetween two TCP servers. I use a Teensy 4.1 and Hercules software for my first tests. The communication beetween server and client is easy, with Hercules set as a client and Teensy as server, and viceversa. Now I'm trying to figure out if is possible to send and listen datas direcly beetween two servers. The server class in NativeEthernet library seems to be able to listen communications from clients object only, is that true? Thank you in advance for your time.

server is a 'listener'. it doesn't communicate. it only builds up the connection.

in theory it is possible for a server listening on one TCP port (handling one or more clients) to be a client on other TCP ports communicating with external servers
I have done this on PCs and Raspberry Pis using multithreaded control - not sure if the Arduino libraries would support it though

I have a project with 3 servers and 5 clients in one Arduino sketch

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.