update code for webcam server.