The error usually means that the port you are trying to open is being already used by another application. Try using netstat to see which ports are open and then use an available port.
Also check if you are binding to the right ip address (I am assuming it would be localhost)
Related Posts:
- Bad File Descriptor with Linux Socket write() Bad File Descriptor C
- connect Error: “No route to host”
- Does connect() block for TCP socket?
- What can cause a “Resource temporarily unavailable” on sock send() command
- Why should we check WIFEXITED after wait in order to kill child processes in Linux system call?
- Where to find the complete definition of off_t type?
- malloc(): memory corruption
- Where is the
header file on Linux? Why can’t I find ? - Where does linux store my syslog?
- How to know what the ‘errno’ means?
- How to use shared memory with Linux in C
- What can be the reasons of connection refused errors?
- Why does ENOENT mean “No such file or directory”?
- Write to .txt file?
- Connect: Socket operation on non-socket
- How to print pthread_t
- Cannot assign requested address – possible causes?
- The difference between stdout and STDOUT_FILENO
- Creating a new directory in C
- where does stdio.o live in linux machine?
- Display value found at given address gdb
- How to do scanf for single char in C
- Sign extend a nine-bit number in C
- Break statement not within loop or switch in C
- How to properly malloc for array of struct in C
- Cache Simulator in C
- expected expression before ‘{‘ token
- C Vector/ArrayList/LinkedList
- Convert char array to a int number in C
- What is the difference between %f and %lf in C?
- warning: initializer element is not computable at load time
- What is stdin in C language?
- error: ‘for’ loop initial declarations are only allowed in C99 mode [duplicate]
- c – warning: implicit declaration of function ‘printf’
- Flushing buffers in C
- error: aggregate value used where an integer was expected
- Undefined Reference issues using Semaphores
- Implementing shell in C and need help handling input/output redirection
- How to compile makefile using MinGW?
- Portable way to check if directory exists [Windows/Linux, C]
- Incorrect checksum for freed object on malloc
- How to copy a char array in C?
- Simple way to check if a string contains another string in C?
- How to convert integer to char in C?
- Is there a good Valgrind substitute for Windows?
- Difference between “move” and “li” in MIPS assembly language
- Writing a simple shell in C using fork/execvp
- Initializing array of structures
- Still Reachable Leak detected by Valgrind
- What is the difference between array and enum in C ?
- Implementation of multiple pipes in C
- How can one see content of stack with GDB?
- What is signed integer overflow?
- What does the term “empty loop” refer to exactly in C and C++?
- When to use const char * and when to use const char []
- What do numbers using 0x notation mean?
- What integer hash function are good that accepts an integer hash key?
- Can I create an Array of Char pointers in C?
- Does stack grow upward or downward?
- X86 assembly – Handling the IDIV instruction
- error C2371: ‘functionname’ redefinition: different basic types
- configure: error: cannot run C compiled programs
- Pause screen at program completion in C
- note: previous implicit declaration of ‘point_forward’ was here
- What exactly is meant by “de-referencing a NULL pointer”?
- Difference between fgets and fscanf?
- getc() vs fgetc() – What are the major differences?
- Can’t understand the working of getint() in C as per K&R
- Lua – Number to string behaviour
- What is `S_ISREG()`, and what does it do?
- Realloc Invalid Pointer in C
- Using sys/socket.h functions on windows
- Difference between exec, execvp, execl, execv?
- What tools are there for functional programming in C?
- typedef fixed length array
- “-bash: gcc: command not found” using cygwin when compiling c?
- In C, what exactly happens when you pass a NULL pointer to strcmp()?
- How to format strings using printf() to get equal length in the output
- What are the differences between if, else, and else if?
- Example of waitpid() in use?
- strtok segmentation fault
- Invalid write of size 1
- How to solve static declaration follows non-static declaration in GCC C code?
- realloc(): invalid next size when reallocating to make space for strcat on char *
- C Error: declaration shadows a local variable — Won’t let me repeatedly replace the value of my float variable
- Can a function return two values?
- C: warning: excess elements in array initializer; near initialization for ‘xxx’ ; expects ‘char *’, but has type ‘int’
- MIPS to C Translation
- Pointer to 2D arrays in C
- Printf was not declared in this scope
- How to free memory from char array in C
- Can I get Unix’s pthread.h to compile in Windows?
- Initializing 2D char array in C
- Pointer to a string in C?
- Process exited with return value 3221225477
- gdb: No symbol “i” in current context
- %p Format specifier in c
- “Nothing to be done for makefile” message
- Convert Char to String in C
- What is the difference between signed and unsigned int