C socket.recv() equivalent in dart

Hi,
I’m looking for a way to receive data from a plain TCP socket and blocking the thread until data arrives so that execution stops when calling the receiving function.
I have tried many things to get this behavior but nothing seems to work right.
the closest attempt was using the socket.first getter but this only works once and then the stream closes.

Any advice would be highly appreciated! :slight_smile:
Thanks in advance.