Skip to content

Nothing happens on 'request´ #9

@dkcas11

Description

@dkcas11

Hey, i have setup my server and trying to connect from iOS 11.3, but so far nothing is being called in the onRequest function or listener. Am i missing something?

Currently my iPhone fails to connect and shows an error, but shows up as connected after a while, even though nothing happens in the terminal.

'use strict'

var airplay = require('airplay-server')
var port = 7000

var server = airplay({ name: 'my-airplay', txt: {
	deviceid: 'xxx'
   	features: 0x5A7FFFF7,
	flags:0x44,
   	model: 'AppleTV3,2',
	pk:'xxx',
	pi:'xxx',
  	srcvers: '220.68',
	vv: 2
}}/*, function (req, res) {
	// onRequest
  	console.log(req.method, req.url)
  	console.log(req.headers)
}*/)

server.on('request', function (req, res) {
  	console.log(req.method, req.url)
  	console.log(req.headers)
})

server.on('listening', function () {
	// stuff
})

server.listen(port, function () {
 	console.log('AirPlay server is listening on port %d', server.address().port)
})

Fair warning, i am not a JS dev though.

Thanks :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions