Forum Discussion
4 Replies
- Altera_Forum
Honored Contributor
Any suggestion is welcome, thanks a lot
- Altera_Forum
Honored Contributor
Create a function say resetConn() and forcefully assign -1 to connection ID within this function...this willl reset your connection
- Altera_Forum
Honored Contributor
kaushal,thanks for your replay
I know what you say , but my questions is how to detect the link is down. The programme block at send() function and don't return. I want return from the send function when link is down and then reset the connection. - Altera_Forum
Honored Contributor
I think that normally send() would return if the link goes down. At least this is what happens in my system; but maybe the behaviour is related to the mac-phy you are using.
Alternatively you can configure the socket in non blocking mode. In this way send() always returns and then you can test the link and decide if you want call send() again or reset the connection.