TsgcWebSocketClient › 属性 › WriteTimeout
向对端发送数据的最大持续时间(毫秒)。
property WriteTimeout: Integer read FWriteTimeout write FWriteTimeout;
60000
该值在套接字连接时读取,并在 Windows、Linux、macOS、iOS 和 Android 上作为 SO_SNDTIMEO 套接字选项应用。正值在指定毫秒数内无法刷新出站缓冲区时中止发送操作。值为 0 表示未设置,将应用 60000 毫秒的默认值,这也是在该属性初始化之前保存的窗体所流入的值。负值则完全取消该限制,允许发送无限期阻塞,这与 ReadTimeout 使用 -1 的约定相同。
oClient := TsgcWebSocketClient.Create(nil);
oClient.URL := 'wss://www.esegece.com:2053';
oClient.WriteTimeout := 10000;
oClient.Active := true;