static public IOConnection register(String origin, SocketIO socket) {
		List<IOConnection> list = connections.get(origin);
		if (list == null) {
			list = new LinkedList<IOConnection>();
			connections.put(origin, list);
		} else {
			synchronized (list) {
				for (IOConnection connection : list) {
					if (connection.register(socket))
						return connection;
				}
			}
		}

		IOConnection connection = new IOConnection(origin, socket);
		list.add(connection);
		return connection;
	}
Creates a new connection or returns the corresponding one.

@param origin
           the origin
@param socket
           the socket
@return a IOConnection object
src/io/socket/IOConnection.java