FUNCTIONS IN lab_chat.py
def get_peer_node(username): # function name is get_peer_node Parameters: username: This is the name of the user where you want to find the Pyre node Returns: It appears to return the node
def join_group(node, group): # function name is join_group Parameters: node: This is the node where the chats are group: This is the group on the node that I want to connect to. Returns: This join_group method does not appear to return anything.
def chat_task(ctx, pipe, n, group): # function name is chat_task Parameters: ctx: This is a ZeroMQ Connection Context pipe: This is a communications pipe polled by ZeroMQ for messages. n: This is the peer to peer node my chat app is connected as group: This is the peer chat group I wanted to join Returns: The chat_task method does not return anything, it appears to be the send/recieve manager.
def get_channel(node, group): # function name is get_channel
Parameters:
node: This is the node where the chats are
group: This is the group on the node that I want to connect to.
Returns:
Returns the channel for that noding group. It appears to create a new thread.