No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Does anyone know of any examples or tutorials for how to create a pthreads server? I have built a web server using fork() which works fine. I want to convert it to multi threading but I really cannot understand how the variables work in respect to mutexing, i don't understand … |
|
Hi I have written the following code but when I run it, it fails to bind every time, any ideas why? [CODE]int main(int argc, char *argv[]) { int port = 1080; int lsd, sd; struct sockaddr_in serv_addr, remote_addr; socklen_t remote_len; if(argc < 2 || argc > 2) { printf("Syntax is: … |
|
Hi in my program there is an option to enter a directory as a command line argument. Is there any check I can perform to see whether this directory is relative to the current working directory? For example if we are /home/user and the user wants to input /home/user/folder they … |
|
OK so I use the following code to get a hash of a file and print it to the terminal. I want to then add this hash to a file with other text based data in it, so I assume I need to convert to ASCII somehow. I must also … |
|
Hi I'm new here and I have a problem which is hindering me. I have opened a file and wrote some stuff to it. Then later on I want to open the file and read it back in to a buffer. When I try to read the file back in … |