Question: I want to get a flicker button , and then I code like this
I init the button like this:

```
_btn = [[UIButton alloc] initWithFrame:CGRectMake(50, 50, 200, 200)];
[_btn addTarget:self action:@selector(test:) forControlEvents:UIControlEventTouchUpInside];
[_btn setBackgroundImage:[UIImage imageNamed:@"img2.jpg"] forState:UIControlStateNormal];

```

and the I code the animation like this :

```
[UIView animateWithDuration:1 delay:0 options:UIViewAnimationOptionRepeat|UIViewAnimationOptionAutoreverse animations:^{
    _btn.alpha = 0.2;
} completion:nil];

```

The button is vague but it can not be selected , it can not receive the sender .
Anyone knows why it can not receive the sender ?

Answer: 
> 
> Setting time out for connect() function tcp socket programming in C is not working
> 
> 
> 

Correction. Setting the connect timeout *is* working. What 'isn't working' is the subsequent `recvfrom()`, and that's because you left the socket in non-blocking mode and you don't know what to do with the resulting `EAGAIN.` So, either handle that, by using `select()` to tell you when the socket is ready to read, or else put the socket back into blocking mode after finishing the connect.
The socket should be set to blocking mode again before calling recv().

```
fcntl(sockfd, F_SETFL, fcntl(sockfd, F_GETFL, 0) & ~O_NONBLOCK);

```