Do websockets allow for p2p (browser to browser) communication?

No. Browsers can only initiate WebSockets connections, not receive them. The W3C browser API spec only defines how to start an outbound connection. You can make an application that would both initiate and accept WebSockets connections, but browsers do not do this. You might look at Pusher App which you could use to build a … Read more

DHT in torrents

With trackerless/DHT torrents, peer IP addresses are stored in the DHT using the BitTorrent infohash as the key. Since all a tracker does, basically, is respond to put/get requests, this functionality corresponds exactly to the interface that a DHT (distributed hash table) provides: it allows you to look up and store IP addresses in the … Read more

How can I make a browser to browser (peer to peer) connection? [closed]

Here on Stackoverflow are several topics about P2P connections in browsers: Will HTML5 allow web apps to make peer-to-peer HTTP connections? What techniques are available to do P2P in the browser? Does HTML5 Support Peer-to-Peer (and not just WebSockets) Can HTML5 Websockets connect 2 clients (browsers) directly without using a server (P2P) Is it possible … Read more

How does DHT in torrents work?

With trackerless/DHT torrents, peer IP addresses are stored in the DHT using the BitTorrent infohash as the key. Since all a tracker does, basically, is respond to put/get requests, this functionality corresponds exactly to the interface that a DHT (distributed hash table) provides: it allows you to look up and store IP addresses in the … Read more

Detect the specific iPhone/iPod touch model [duplicate]

You can get the device model number using uname from sys/utsname.h. For example: #import <sys/utsname.h> NSString* machineName() { struct utsname systemInfo; uname(&systemInfo); return [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; } The result should be: @”i386″ on the simulator @”iPod1,1″ on iPod Touch @”iPod2,1″ on iPod Touch Second Generation @”iPod3,1″ on iPod Touch Third Generation @”iPod4,1″ on iPod Touch … Read more