$message = "; $message. = Pack (" A99 ", $mail); $message. = Pack (" A32 ", $pass); $message. = Pack (" A19 ", $action); $from ="; $p ORT = 0;//echo $message, if ($socket = Socket_create (Af_inet, Sock_dgram, sol_udp)) {//socket_bind ($socket, ' 127.0.0.1 ', 27015) socket_sendto ($socket, $message, strlen ($message), 0, $server _ip, $server _port); $ret = Socket_recvfrom ($socket , $result, Msg_waitall, $from, $port);}
Using this code to send a UDP struct is unsuccessful, and the pack is commented out and executed again, no problem.
Socket_sendto not sent successfully, the other party received no message, no return data. has been blocked--
How does UDP send a struct?
Reply to discussion (solution)
No one answered???
No complete code, no receiving end
Who knows what you're going to do?
Don't blame others for ignoring you, guess there is no condition
Oh hehe oh oh.
It is a simple test program, but also need to put the complete code?
That's very clear. No one answers, just forget it.
So, I'm going to do a receiver to listen to ROM.
I want to say no problem, do you believe it?