Questions tagged [stream-socket-client]

99 questions
10
votes
2 answers

Why does the use of StreamSocket in a loop cause a memory leak?

I'm developing a C#, UWP 10 solution that communicates with a network device using a fast, continual read/write loop. The StreamSocket offered by the API seemed to work great, until I realized that there was a memory leak: there is an accumulation…
BCA
  • 7,776
  • 3
  • 38
  • 53
8
votes
2 answers

Connect NestJS to a websocket server

How can NestJS be use as a websocket client? I want to connect to a remote websocket server as a client using NestJS, but I didn't find any information about this implementation in the framework.
Georgian Stan
  • 1,865
  • 3
  • 13
  • 27
6
votes
1 answer

UWP, how to read ALL data from StreamSocket

I'm trying to implement a XMPP client for UWP in C# and to achieve this I'm using StreamSocket for TCP connection. The problem is that for handshake and SASL auth I need a sequence of "writing and reading" from the client by the server and without a…
blow
  • 12,811
  • 24
  • 75
  • 112
5
votes
1 answer

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

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…
4
votes
1 answer

In a in WinRT app, how do I connect using TLS1.2?

I've got a Windows Store app that's a WinRT Phone/Desktop app (i.e. not a UWP app), targeting Windows 8.1 and up. It's been on the store for several years now, but recently it stopped being able to connect with various web APIs and websites…
4
votes
2 answers

Warning : stream_socket_client( ) , php_network_getaddresses getaddrinfo failed nodename nor serv name provided or notknown

When I am connected to internet then It works perfect but when Internet is not connected then I go error on following lines: $socket_context = stream_context_create($options); $this->smtp_conn = @stream_socket_client($host.":".$port, $errno,…
Ponting
  • 2,248
  • 8
  • 33
  • 61
3
votes
1 answer

stream_socket_client time out

I'm trying to debug the PHP function stream_socket_client but I don't really know how. This is the code that I'm having trouble with: $this->socket = @stream_socket_client( $remote, $errno, $errstr, …
C. E.
  • 10,297
  • 10
  • 53
  • 77
3
votes
1 answer

SSL operation failed with code, while sending push notification to ios devices

I am trying to send push notifications, to iOS Devices which was working pretty well, but suddenly it started throwing the following error: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:14094438:SSL…
3
votes
0 answers

Reading data from a StreamSocket

From looking at the example application on the Microsoft Website How to connect with a stream socket (XAML) , I have learned how to connect to a server, and send string to the server. However, the example doesn't quite extend on reading data from…
Moynul
  • 635
  • 1
  • 8
  • 30
3
votes
0 answers

Operation identifier is not valid

before I start I just want to say that I was looking for solution of this problem for a very long time and I didn't find anything that could help me to solve it. I need to connect to some server, send a message and display result. It's pretty easy,…
Mateusz Cisek
  • 775
  • 11
  • 22
3
votes
1 answer

c# .net Windows 8 App TcpClient code port to StreamSocket

I had this code prior to .net 4.5 _Connection = new TcpClient(hostname, port); _Stream = _Connection.GetStream(); For Windows 8 App I changed to: _Connection = new StreamSocket(); await _Connection.ConnectAsync(new HostName(hostname),…
c0D3l0g1c
  • 3,020
  • 5
  • 33
  • 71
2
votes
1 answer

Test web connection by a socket-client in my vue 3 composition API app

I'm making a vue 3 app, I'm starting with a web connection test visiting the official web guide, but I don't reach the goal to test it through the socket-client.io package. How do I do this?. This is what I've done about it, I need to make a socket…
2
votes
0 answers

stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known wordpress

I want to access server data nginx server then i get this error: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known please help me out how i can fix this issue. that's my code that i can use to…
2
votes
1 answer

php stream_socket_client first call takes too long

I'm opening multiple (75) streams through stream_socket_client() and then processing it with stream_select(). The first call of this method takes approx. 15 seconds and I have no idea why. Next calls are much faster - less than one or two seconds…
2
votes
1 answer

PHP stream_socket_client not using proxy

I'm trying to get stream_socket_client working with proxy server. Peace of code: ['proxy' => '147.135.210.114:54566', 'request_fulluri' => true]]); //$file =…
chudzini
  • 29
  • 4
1
2 3 4 5 6 7