#include <netinet/in.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>

int main (int argc, char *argv[])
{
	int sock, rc;
	struct sockaddr_in addr;

	sock = socket(AF_INET, SOCK_STREAM, 0);
        if (sock < 0) {
                exit(EXIT_FAILURE);
        }

	addr.sin_family = AF_INET;
        addr.sin_port = htons(1337);
        addr.sin_addr.s_addr = INADDR_ANY;

	rc = bind(sock, (struct sockaddr*) &addr, sizeof(addr));
        if (rc < 0) {
                exit(EXIT_SUCCESS);
        }

	sleep(2);

	close(sock);

	exit(EXIT_FAILURE);
}
