A method for controlling an image-forming apparatus, the method comprising:
- establishing a connection with a terminal device using Quick User Datagram Protocol (UDP) Internet Connections (QUICs);
- storing identification information for identifying the connection and key information to be used for encryption of transmission-reception information transmitted to and received from the terminal device;
- communicating the transmission-reception information with the terminal device through Hypertext Transfer Protocol (HTTP)/3;
- and
- establishing, when the connection with the terminal device is disconnected, a reconnection with the terminal device using the identification information to resume the communication of the transmission-reception information with the terminal device.