Pipe input into a process running on a port

I startet a process with socat: socat tcp-listen:port,reuseaddr,fork, exec:”./program”
Now i can connect to the program with netcat: nc ip port. It will start the program and expects the user to give some input. (Its a simple c program which calls gets function) How can i give the input from a command, p.e echo ‘some input’