forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Crazy delay before socket is ready

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
lgnr



Joined: 17 Dec 2009
Posts: 39

PostPosted: Wed Jul 07, 2010 5:05 am    Post subject: Crazy delay before socket is ready Reply with quote

So i have a loop like this inside a thread:

Code:

while(running)
{
    error = sendto(sock,message,sizeof_message, 0, (struct sockaddr *)&address, sizeof(address));

   if(error < 0) printf("Error on sendto\n");

   sleep(100000);
}


It outputs "Error on sendto" for about 3 minutes and then starts to send right.
Funny thing is: When it was inside main(), it did the same, except that it was for about only 20 seconds.
Any ideas?

Thanks in advance.
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Wed Jul 07, 2010 6:20 am    Post subject: Reply with quote

Didn't you already post this same question already? Spamming it more isn't going to help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group