sockets - PHP Socket_recvfrom -
ok im editing code written
but seem struggling, did try search on here, not find looking for.
anyway.
$recv = socket_recvfrom($sock, $buf, 2036, 0, $ip, $port); if($recv == false){ echo "failed recv ".socket_last_error()."<br>\n"; return ''; } else { echo "<br>buf recieved: ".$recv." bytes\n\n"; echo"<br><br>"; echo $buf . "\n"; }
now issue seem able receive 1036 bytes of information, randomly cuts off displaying part of should. can see have tried increasing says 2036, increased 65k , still nothing.
maybe need kind of delay has chance retreive information?
heres get
buf recieved: 1036 bytes
then list of players, not whole player list. randomly cuts off after 1036 bytes.
thanks in advance advice.
you should try recive multiple times socket, maybe sending server splits message.
Comments
Post a Comment