Javascript client with TRoIndyTCPserver

I have a Remoting SDK server based on TROIndyTCPServer and TROBinMessages.
I have generated a JavaScript interface for this server and want to connect this server from JavaScript client.

generated client interface has some code commented as follows :

var Channel = new RemObjects.SDK.HTTPClientChannel(



    var Message = new RemObjects.SDK.JSONMessage();

    var Service = new NewService(Channel, Message);




      function(result) {



      function(msg) {




My question is : Server is based on tcp communication , and JavaScript client has HTTPClientChannel to communicate with server.
I tried to connect with this server but always getting connection refused.
What am I missing here ?


JavaScript supports only http channel.
as a result, you should drop a http based server channel to your delphi server datamodule near to existing a tcp server component if you want to connect from javascript.

so your action can be:

  • drop http based server to server datamodule
  • register Bin dispatcher in this http server component
  • [optionally] change default port of this http server component.
  • activate it ( := True) in the OnCreate event of server datamodule.