|more useful options|
Re^3: How to sent binary data in socket programming ?by golux (Friar)
|on Jul 14, 2013 at 11:21 UTC||Need Help??|
First, how can we know what the result of the following is? ...
That's a file on your system, which we have no access to.
You also haven't said anything about the results you get back, which makes it impossible to know how it's failing for you.
Do you have access to the server-side code? If so, try logging to a local file what's happening on the server side. Make sure you log each step, so if something fails you'll know exactly where in the code it happened.
If you look at the documentation for recv it suggests perusing "UDP: Message Passing" in perlipc for examples, and referring to that section of the perlipc docs shows an example of recv where the error is displayed:
What happens if you do the same in your code?, ie.:
Update: looking closer at recv shows that it may be the return value from $socket->recv(...) that you want to check for undef, ie: