Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatUserInterface ¶
type ChatUserInterface struct { Chat *pubSubService.CRoom App *tview.Application PeersList *tview.TextView MsgW io.Writer InputCh chan string DoneCh chan struct{} PeerMap map[peer.ID]string }
Modified ChatUserInterface struct which has added a hash map to keep track of peer ids mapped to a username.
func NewChatUI ¶
func NewChatUI(chat *pubSubService.CRoom) *ChatUserInterface
This function is not modified except for adding the PerrMap to keep track of users in the chat. NewChatUI returns a new ChatUI struct that controls the text UI. It won't actually do anything until you call Run().
func (*ChatUserInterface) DisplaySelfMessage ¶
func (ui *ChatUserInterface) DisplaySelfMessage(msg string)
This function is not modified. displaySelfMessage writes a message from ourself to the message window, with our nick highlighted in yellow.
func (*ChatUserInterface) Run ¶
func (ui *ChatUserInterface) Run(instance *state.State, transactionData *bind.TransactOpts) error
This function is not modified other then for the test which changed it to the testEventHandler Run starts the chat event loop in the background, then starts the event loop for the text UI.