EldoS | Feel safer!

Software components for data protection, secure storage and transfer

WebSocketServer

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#36873
Posted: 06/03/2016 04:10:02
by Edo Cof (Premium support level)
Joined: 06/24/2011
Posts: 4

Hi.
I am trying to connect to your WebSocketServer with javascript:
Code
that.ws = new WebSocket("ws://10.0.0.14:80");


After quite some time I think I figure it out how to do it. (I was trying through TElWebSocketServer, but no port, no event on connection accepted ...)
Code
  s := TElHTTPSServer.Create(nil);
  s.SSLMode := false;
  s.OnWebSocketConnectionEstablished := WebSocketConnectionEstablished;
  s.Open


When I try to connect I get error in javascript console:
Quote
WebSocket connection to 'ws://10.0.0.14/' failed: Error during WebSocket handshake: Unexpected response code: 200

Firewall is off, there are no antivirus installed on computer.

1. Do you have any minimal code how should I set server, that I can connect to it.

2. How can I set listening port? 80 is reserved for Apache?
#36875
Posted: 06/03/2016 04:20:04
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Please check next sample for details of WebSocket server implementation:
\EldoS\SecureBlackbox.VCL\Samples\Delphi\HTTPBlackbox\Server\HTTPSServer
#36876
Posted: 06/03/2016 04:37:00
by Edo Cof (Premium support level)
Joined: 06/24/2011
Posts: 4

Hi,
I try to connect to localhost and local IP, with allowed exception in firewall(localhost) and no firewall (local network - 10.0.0.14) but I get connection refused.
Quote
WebSocket connection to 'ws://localhost:47710/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
#36888
Posted: 06/06/2016 04:31:17
by Vsevolod Ievgiienko (EldoS Corp.)

Quote
but I get connection refused.

Do you try to connect to the above mentioned sample or your own code?

Reply

Statistics

Topic viewed 1243 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!