network programming and sockets just to illustrateconsider the following program that carries out the task described in the song " million bottles of beer on the wall"bottles def drink_beer()remaining while remaining remaining - def drink_bottles()global bottles while bottles drink_beer(bottles - nowsuppose you wanted to add remote monitoring capability to this code that allows clients to connect and see how many bottles are remaining one approach is to launch server in its own thread and have it run alongside the main application like thisdef server(port) socket socket(socket af_inet,socket sock_streams bind(('',port) listen( while trueclient,addr accept(client send(("% bottles\ \nbottlesencode('latin- 'client close(launch the monitor server thr threading thread(target=server,args=( ,)thr daemon=true thr start(drink_bottles(the other approach is to write server based on / polling and embed polling operation directly into the main computation loop here is an example that uses the coroutine scheduler developed earlierdef drink_bottles()global bottles while bottles drink_beer(bottles - scheduler mainloop(count= ,timeout= poll for connections an asynchronous server based on coroutines def server(port) cosocket(socket socket(socket af_inet,socket sock_stream)yield bind(('',port)yield listen( while trueclient,addr yield accept(yield client send(("% bottles\ \nbottlesencode('latin- 'yield client close(scheduler scheduler(scheduler new(server( )drink_bottles(if you write separate program that periodically connects to the bottles of beer program and measures the response time required to receive status messagethe results are lib fl ff