Skip to content

Instantly share code, notes, and snippets.

@rahuloak
rahuloak / server.js
Last active February 18, 2021 19:21
APNS mock server
/**
* Mock APNS server
*/
var net = require('net');
var HOST='127.0.0.1';
var PORT=7777;
// Need this option so the client doesn't close
// the connection on sending a FIN
@rahuloak
rahuloak / client.js
Last active February 18, 2021 19:20
APNS client
/**
* APNS test client
*/
var net = require('net');
var HOST = '127.0.0.1';
var PORT = 7777;
var TOKEN_LENGTH = 64;
var NUM_PACKETS = 5;