I want to connect to some server and find if the special port is open or not, so I want to send TCP packet with SYN flag set and get the result packet from server and check the result flag to find out if the port is open, closed or filtered? now my question is how can I create this TCP connection (I just need 2 way connection not 3-way handshake) please show me how can I create this special connection and how can I check special flag and how can I create my TCP connection with my desired flag.