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

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

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

Programming P2P application

P2P connectivity in a nutshell. Assume we’re talking about UDP here. The steps below can also be applied to TCP with some adjustments. Enumerate all your local IP addresses (usually only 1). Create a UDP socket on a given port number** for each adapter with an IP address. For each socket created in step 1, … Read more