two threads on each end, both having an infinite while loop. They wait and loop until either you send or receive a message. When you type “quit” the loop hits a break; statement to exit the loop
There is an ip call to get my current ip address
loop around address 127.0.0.1
API Calls
Blocking API Calls
the program does not continue until the API is resolved
system.in or cin stops the program until the user inputs something on the keyboard
sleep is always a blocking call and can be used after a non-blocking API call to force the function to block so that other functions or processes can work while we wait for input
Non-Blocking API calls
non blocking API calls will continue regardless if the function is answered