stream-socket-client

How does the timeout apply on StreamSocket.readAsync()?

丶灬走出姿态 提交于 2020-01-07 00:52:15
问题 I have created the streamSocket that received the stream of media. I want to read the stream on this socket and also want to apply readTimeout. So that I have applied it using CancellationTokenSource. As per my requirement, if I cant read within timeout limit, I dont want to close this socket. However, applying cancellation token causes the socket close in my program. Is there any way to apply time out without closing the socket? await socket.InputStream.ReadAsync(readBuffer, 8,

How does the timeout apply on StreamSocket.readAsync()?

China☆狼群 提交于 2020-01-07 00:52:07
问题 I have created the streamSocket that received the stream of media. I want to read the stream on this socket and also want to apply readTimeout. So that I have applied it using CancellationTokenSource. As per my requirement, if I cant read within timeout limit, I dont want to close this socket. However, applying cancellation token causes the socket close in my program. Is there any way to apply time out without closing the socket? await socket.InputStream.ReadAsync(readBuffer, 8,

Connection error 10060 while connect to apple push service

六眼飞鱼酱① 提交于 2019-12-12 04:05:23
问题 im using windows server and run php 5 i got this error Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ) in C:\Inetpub\vhosts\..domain..\simplepush.php on line 21 Failed to connect: 10060 A connection attempt failed because the

PHP stream_socket_client ignoring timeout

自古美人都是妖i 提交于 2019-12-11 05:38:09
问题 I'm using zend_mail from zend-framework2 in my project to send some amount of emails in a loop, but sometimes it takes more than usual to send an email. After doing some research, i found that the delay occurs on the stream_socket_client function. I tried to set this function's timeout to acceptable value, but it seems to ignore that setting. Also tried to use STREAM_CLIENT_PERSISTENT to limit the number of opened sockets but with no luck. Average stream_socket_client times are about 0.03

PHP SSL stream_socket_client won't use created $context

余生长醉 提交于 2019-12-04 04:59:24
问题 I'm totally disappointed. I am connecting to a ssl servers, and direct connections working well, but when I am trying to add stream context to use proxy or socks5, socket won't use it and connecting pretty well directly to these ssl:// server anyway, I am checking by watching 127.0.0.1 proxy server log - there weren't even connection attempts. Also, could I wrap stream into socks5 server using socks5:// http proxy option? $ctx = stream_context_create( array( "http" => array( "timeout" => 15,

PHP SSL stream_socket_client won't use created $context

喜欢而已 提交于 2019-12-02 06:29:20
I'm totally disappointed. I am connecting to a ssl servers, and direct connections working well, but when I am trying to add stream context to use proxy or socks5, socket won't use it and connecting pretty well directly to these ssl:// server anyway, I am checking by watching 127.0.0.1 proxy server log - there weren't even connection attempts. Also, could I wrap stream into socks5 server using socks5:// http proxy option? $ctx = stream_context_create( array( "http" => array( "timeout" => 15, "proxy" => "tcp://127.0.0.1:3128", "request_fulluri" => TRUE, ), "ssl" => array( "SNI_enabled" => FALSE

stream_socket_client failing on my server with no way to know more about the error

二次信任 提交于 2019-12-01 18:03:32
This code: ( https://github.com/stuffmc/Safari-Push-Notifications/blob/master/index.php#L195 ) stream_socket_client('ssl://gateway.push.apple.com:2195', $error, $errorString, 60, STREAM_CLIENT_CONNECT, $streamContext); returns false , but with no errors. It means that when I'm sending to /v1/push it fails for every device/token :( The PHP documentation says: If the value returned in errno is 0 and the function returned FALSE, it is an indication that the error occurred before the connect() call. This is most likely due to a problem initializing the socket. I have this code running perfectly

stream_socket_client failing on my server with no way to know more about the error

◇◆丶佛笑我妖孽 提交于 2019-12-01 18:01:00
问题 This code: (https://github.com/stuffmc/Safari-Push-Notifications/blob/master/index.php#L195) stream_socket_client('ssl://gateway.push.apple.com:2195', $error, $errorString, 60, STREAM_CLIENT_CONNECT, $streamContext); returns false , but with no errors. It means that when I'm sending to /v1/push it fails for every device/token :( The PHP documentation says: If the value returned in errno is 0 and the function returned FALSE, it is an indication that the error occurred before the connect() call