Changed to SOCK_STREAM due to error on listen function.