NativeEthernet library and two socket clients


Hi all,

I have a problem with some code where I use two socket clients.

One of them connects to a server external, I receive data from this server and send data (or in theory they are sent, I can't check it).

On the other hand, I have another client connected to a different server, this one is my property. In the latter, data is sent, which is received for a few seconds, but then nothing is received, although the teensy seems to send it, since no error appears, and I also have this code
size_t bytessend = socketClient.print((const char *)buffer);
that return the total number of correct bytes, but nothing reaches the server.
It is not a problem on the server side, since I have tried with other devices and everything works OK, so I deduce that the problem is on the teensy side.

Additionally I have noticed that if I perform a
the other connection (the one on the external server) starts to fail and disconnects, I don't know why.

This is my clients definitions:
EthernetClient socketClient;
EthernetClient ntripClient;

Any idea?
May I suggest giving the QNEthernet library a try and see if you see the same issues? There’s lots of information in the Readme and examples.
Ok, now try QNEthernet library, but on compile show me this error:

.pio\libdeps\teensy41\QNEthernet\src\sys_arch.cpp:191:3: error: 'srand' is not a member of 'std'
I’ve already fixed that issue in the latest code. Can i see your platformio.ini file?
This is my platformio.ini:

platform = teensy
board = teensy41
framework = arduino
monitor_speed = 115200
lib_deps = ssilverman/QNEthernet@^0.27.0

Try this:
lib_deps =
That gets the latest.

You may need to also delete .pio/libdeps/teensy41/QNEthernet.