• java.net.sockettimeoutexception read timed out


    java.net.sockettimeoutexception read timed out

    超时时间设长一点儿即可

    Socket.setSoTimeout(int timeout);

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------

    注意下面几个超时时间(soTimeout只有100毫秒)

        /**
         * The timeout of the read() of this socket's input stream (in milliseconds)
         
    */
        private int soTimeout = 100;

        /**
         * timeout for connect and close
         
    */
        protected long timeout = 60 * 1000;

        /**
         * retry timeout in millisecods
         
    */
        protected int retryTimeout = 60 * 1000;

        /**
         * maximum retry timeout allowed
         
    */
        protected int maxRetryTimeout = MAXRETRYTIMEOUT;
  • 相关阅读:
    python标准库
    python常用标准库
    django-restframework-serializers
    Resources.UnloadUnusedAssets
    Shader 的 Blend
    C++STL queue
    C++STL stack
    C++STL deque
    C++STL容器重点
    C++STL 迭代器
  • 原文地址:https://www.cnblogs.com/cuizhf/p/2203739.html
Copyright © 2020-2023  润新知