How do I write to a socket via curl? Need help with raw TCP communication! or Can you write to a sock

20 Replies, 1906 Views

"Can you write to a socket via curl? Looking for a simple example."

Hey folks,

I’m trying to figure out how to write to a socket via curl for some raw TCP stuff. Like, just shoving data straight into a socket without HTTP getting in the way.

I know curl’s *usually* for HTTP, but I heard it can do raw TCP? Maybe with `--telnet` or `--raw`? Googling gives me mixed results, and the docs are... uh, *dense*.

Anyone got a quick example of how to write to a socket via curl? Like, just `echo "hello" | curl --something something`?

Bonus points if you’ve actually done this in prod and it didn’t explode.

Thanks! 🚀

Messages In This Thread
How do I write to a socket via curl? Need help with raw TCP communication! or Can you write to a sock - by - 21-11-2024, 10:50 AM



Users browsing this thread: 1 Guest(s)