Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

indentify is optional

  • Loading branch information...
commit cd38997ba3801ba5e14616c1ff9aa2652ede3d87 1 parent db4fa37
@Raynos authored
Showing with 1 addition and 6 deletions.
  1. +0 −3  example/simple/static/index.js
  2. +1 −3 networks/connection.js
View
3  example/simple/static/index.js
@@ -5,9 +5,6 @@ var DiscoveryNetwork = require("../../../browser")
// Open discovery connection
var conn = Connection("http://localhost:8081/shoe")
-// Identify ourself with a random UUID
-conn.identify()
-
// Open up a set of relay streams through the connection, on the namespace
RelayStreams(conn, "discovery-network-demo", handleStream)
View
4 networks/connection.js
@@ -14,6 +14,7 @@ function Connection(uri, networkName) {
stream.pipe(mx).pipe(stream)
+ conn.selfId = uuid()
conn.networkName = networkName
conn.identify = identify
conn.mx = mx
@@ -25,9 +26,6 @@ function Connection(uri, networkName) {
return conn
function identify(user) {
- if (!user) {
- user = uuid()
- }
conn.selfId = user.toString()
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.