How can I write to a socket via curl? Need help with raw socket communication!

18 Replies, 1971 Views

Hey! So, curl can indeed write to a socket via curl, but it’s not super straightforward. You’ll want to use the `--unix-socket` flag if you’re dealing with Unix domain sockets. For TCP sockets, you can use `telnet://` or `raw://` schemes, but curl’s support for raw sockets is kinda limited.

If you’re stuck, maybe check out `nc` (netcat) for raw socket stuff—it’s way more flexible for this kind of thing.

Messages In This Thread



Users browsing this thread: 1 Guest(s)