Is possible use Shared drawing canvas (example code) on P5.js (IPad)?

Hello everybody,
I want do the example of the Network Library of Processing “Shared drawing canvas” using my MAC with the processing code as a server and my IPad with (p5.js) as a client, how can this be done?
I tried to copy the client part of the code into P5.js but it gives me error, probably import * Not working
Thanks so much!!

P.S. the code is this Network / (example 2)