To provide a communication device that can execute communications during an optimum time-out period corresponding to request contents, a communication method, and a communication control program.
When there are a plurality of requests by one-time communication processing, a time-out period as a reference for each type of request is previously provided. A request determination part 11B determines the type of request during actual communication by a communication part 18. A communication-time measurement part 11C measures a period of time after transmitting a one-time request for each request until receiving a response. A processing-time calculation part 11D calculates an optimum time-out period in the current communication processing for each type of request from a measured period of time obtained by the communication-time measurement part 11C and the previously-obtained time-out period as a reference. The time-out period calculated for each type of request by the processing-time calculation part 11D is stored in a time-out period storage part 14A. In the subsequent communication processing, communications are executed by the communication part 18 while using the time-out period for each type of request stored in the time-out period storage part 14A in one-time communication processing.