def addNode(self, node):
self._nodes.add(node)<EOL>self._nodeAddrToNode[node.address] = node<EOL>if self._shouldConnect(node):<EOL><INDENT>conn = TcpConnection(poller = self._syncObj._poller,<EOL>timeout = self._syncObj.conf.connectionTimeout,<EOL>sendBufferSize = self._syncObj.conf.sendBufferSize,<EOL>recvBufferSize = self._syncObj.conf.recvBufferSize)<EOL>conn.encryptor = self._syncObj.encryptor<EOL>conn.setOnConnectedCallback(functools.partial(self._onOutgoingConnected, conn))<EOL>conn.setOnMessageReceivedCallback(functools.partial(self._onMessageReceived, node))<EOL>conn.setOnDisconnectedCallback(functools.partial(self._onDisconnected, conn))<EOL>self._connections[node] = conn<EOL><DEDENT>
Add a node to the network

:param node: node to add
:type node: TCPNode