Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
163 views

I try to make a tool that can merge multiple pdf file types, I use askopenfilenames method, select the files and when I print the files it looks like they are ordered alphabetically. Is there a way to ...
Leonard Basag's user avatar
-1 votes
1 answer
306 views

My Linux code below is supposed to search all interfaces until it gets a response from a particular MAC address using ETHERNET type 2 frames. It is not complete. I want select() to block for the ...
DurararaC's user avatar
0 votes
1 answer
213 views

I have a program which prints the content of a file which I send: struct addrinfo hints; struct addrinfo *serverInfo; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints....
ank3r's user avatar
  • 17
0 votes
2 answers
68 views

I am doing something like this val = select(max_fd+1,&readfd,0,0,0); if(val >=1){ printf("I have got some value"); } My code breaks out of select for no reason. It receives no packet. On ...
Curious Guy 007's user avatar
4 votes
1 answer
2k views

I'm new to socket programming and I've been introduced to the select() system call. My question is, lets say I'm writing a server in C (which I am attempting to do) and I want to use the select() call ...
thanos's user avatar
  • 3,371
0 votes
3 answers
140 views

I am trying to implement an application which receives a packet(ICMP maybe) on a tap interface. I have the code something like this. strcpy(ifName, "tap0"); if ((sockfd = socket(PF_PACKET, SOCK_RAW,0)...
Curious Guy 007's user avatar
1 vote
1 answer
3k views

I have a problem with this code: FD_ZERO(&cset); FD_SET(s, &cset); tval.tv_sec = TIMEOUT; tval.tv_usec = 0; n = select(FD_SETSIZE, &cset, NULL, NULL, &tval); if (n==-1) { ...
user2467899's user avatar
1 vote
1 answer
2k views

I am using connect_nonb() from Stevens, UNIX Network programming: int connect_nonb(int sockfd, const SA *saptr, socklen_t salen, int nsec) { int flags, n, error; socklen_t ...
wilysloth's user avatar
3 votes
2 answers
4k views

I am writing a cross-platform library which emulates sockets behaviour, having additional functionality in the between (App->mylib->sockets). I want it to be the most transparent possible for the ...
Leaurus's user avatar
  • 396
0 votes
3 answers
3k views

I'm using select to try and wait for an acknowledgement from another host on the network, but it always returns 0. I've seen other threads with similar questions, and their problem is always either ...
NickLokarno's user avatar
-2 votes
2 answers
2k views

I am building a proxy server in c and I'm trying to understand the select() function. I have the code done so that a connection is made from a client and then the web address is extracted so that ...
user1354916's user avatar
0 votes
1 answer
2k views

Objective: N nodes (running on different machines) should communicate with each other by establishing TCP connections with each other. Sending and receiving messages are done by 2 threads created by ...
Neo's user avatar
  • 141
1 vote
1 answer
493 views

I have a program which spawns off a child script. The child script simply respews any input 1/2 the time back to STDOUT and STDERR. The other half the time, it quietly consumes it. What I am getting ...
John Wingenbach's user avatar
8 votes
2 answers
7k views

I have got signaled socket for read from select(), but then no data arrived by recv call(), instead it returns -1 with errno==EAGAIN. I can grant that no other thread touch the socket. I think that ...
Zdenal's user avatar
  • 81
1 vote
1 answer
767 views

I am fairly new to Linux/socket programming. I am using select to check connections in my server program (it will eventually be a chatroom server). I am using telnet to test it and something weird is ...
James - not really a pirate's user avatar
0 votes
2 answers
4k views

I'm new to network programming. I have to write a simple client/server program in C. The server will listen for a connection and the client will connect to the server, send a message, and receive an ...
newuser12's user avatar
0 votes
2 answers
515 views

I have a program that will always be running when the computer is. It interfaces with serial over USB device. At times the device may not be present when the computer is on. My question is a good ...
ldg's user avatar
  • 1
3 votes
2 answers
4k views

Select function in my case always returns zero, which is timeout and this is happening continuosly so my CPU usage also going upto 98 % for my process. I have also tried to set NULL instead of seting ...
Sandeep Singh Phogat's user avatar
2 votes
1 answer
580 views

When I try to connect to a server with a non blocking socket (so that i can use select() with a timeout parameter) i realized that on a connect to a port which is blocked by iptables with -j REJECT ...
Simon's user avatar
  • 21
2 votes
4 answers
2k views

Most of the time this code works just fine. But sometimes when the executable has been running for a while, select() appears to time out immediately, then get into a weird state where it keeps getting ...
ag6's user avatar
  • 21
4 votes
2 answers
6k views

I want to use the select() function to wait for 1 second, as my program uses signals to control stuff, so sleep() would return prematurely. The weird thing is that when using select() it also returns ...
Sergio Campamá's user avatar
0 votes
2 answers
592 views

Code Sinnpet: int CreateaTCPSocket() { int iSockID = ACE_OS::socket(......); ACE_OS::set_flags(iSockID,O_NONBLOCK); ACE_OS::bind(); if (ACE_OS::connect(iSockID ,....) < 0) { ...
Syedsma's user avatar
  • 1,283
13 votes
5 answers
41k views

I'm trying to make a server that can be connected to by multiple clients. Here's my code so far: Client: int main(int argc, char **argv) { struct sockaddr_in servaddr; int sock = socket(AF_INET,...
ragnaroh's user avatar
  • 364
1 vote
3 answers
419 views

It could probably be a simple question but I couldn't find a clear answer for it. I have multiple threads in c code and one of them uses select to wait for n seconds. The question that I have is that ...
CuriousKernelHacker's user avatar
3 votes
2 answers
133 views

I have a parent and child process, and the parent can read output from the child and send to the input of the child. So far, everything has been working fine with shell scripts, testing commands which ...
Gary's user avatar
  • 916