Implemented server mode.