How can I specify the IP address to be used by a WebSocket server or client in a machine with multiple Network Interface cards?
Hi,
Currently there is no built-in way to do this, however it's a good suggestion and we'll put it on our list.
In the meantime can you try something like this before activating the server?
implementation
uses
IdSocketHandle;
type
TTMSFNCWebSocketServerOpen = class(TTMSFNCWebSocketServer);
{$R *.fmx}
procedure TForm1.Button1Click(Sender: TObject);
var
h: TIdSocketHandle;
begin
TTMSFNCWebSocketServerOpen(TMSFNCWebSocketServer1).HTTPServer.Bindings.Clear;
h := TTMSFNCWebSocketServerOpen(TMSFNCWebSocketServer1).HTTPServer.Bindings.Add;
h.IP := 'YOUR_IP';
h.Port := YOUR_PORT;
TMSFNCWebSocketServer1.Active := True;
end;