0
votes

I'm running push notification form server to my iphone.

... ... // Encode the payload as JSON

$payload = json_encode($body);

// Build the binary notification

$msg = chr(0) . pack('n', 32) . pack('H*', $deviceToken) . pack('n', strlen($payload)) . $payload;

$result = fwrite($fp, $msg, strlen($msg));

when I echo $result. I shown "102". What does this mean?

1
It means you should read the documentation for the return value -- Congrats! You wrote 102 bytes! Don't forget to test if $result === false, too. ;)user1932079

1 Answers

1
votes

1xx Informational

 **102 Processing (WebDAV; RFC 2518)**

As a WebDAV request may contain many sub-requests involving file operations, it may take a long time to complete the request. This code indicates that the server has received and is processing the request, but no response is available yet.[2] This prevents the client from timing out and assuming the request was lost. Source of this Wikipedia List of HTTP status codes