title: Can I create a listening TCP socket using raw sockets in Linux?
body: <p>I would like to create a listening TCP socket where I could control when it responds to the client with the first SYN+ACK after it receives the initial SYN packet from the client.</p>
  
  <p>I want to do this to introduce some delays or ignore some initial SYN packets. I can do this using iptables at the moment, but I'm wondering if this could be done using the OS socket interface.</p>
  
  <p>Note that if I use a normal TCP socket, once the server calls listen() on the socket descriptor, the OS will establish the connection when a client connects to it.</p>
  
  <p>I am wondering then if I could use raw sockets to implement this behavior. All the examples I have seen so far about raw sockets are about active sockets (client to server) and not passive sockets (listening sockets).</p>