jbWishmaster 2 Posted March 27, 2019 I have an old code that I'm trying to translate, make it work with ICS but I am somewhat lost. I am new to ICS and I try to understand it so I am grateful for any help. it is a Client + Server app for a Remote Desktop. the original code is using the components TIdTCPClient and TIdTCPServer, See attachment! 2. Delphi_Remote_Desktop_Source_Code_Keystrokes.zip Share this post Link to post
Angus Robertson 577 Posted March 27, 2019 > I have an old code that I'm trying to translate, make it work with ICS I'd suggest you look at the OverbyteIcsIpStmLogTst.dpr sample project in V8.60 which uses the new TIcsIpStrmLog component. This may be be configured as either a client or a server and allows you to send and receive data, hiding most of the complexity of setting up the SSL connection, so you just have an event where data arrives, and a function to send data. The sample behaves as a client or server, or both. Angus Share this post Link to post
FPiette 385 Posted March 27, 2019 The main difference between the TCP/IP component you currently use and ICS is that ICS if fully asynchronous and event driven while the one you use is blocking. Using ICS, each method you call is merely a request to do the operation. You get back control almost immediately while the operation you requested (connect, send,...) is occurring in the background automatically. When it is done, you get an event (OnSessionConnected, OnDataSent, OnDataAvailable and others...). There are a lot of simple samples delivered with ICS. Have a look at some of them. For example OverbyteIcsTWSChat.dpr which is both a client and a server. François Piette Embarcadero MVP Share this post Link to post
Remy Lebeau 1436 Posted March 27, 2019 16 hours ago, jbWishmaster said: I have an old code that I'm trying to translate, make it work with ICS ... the original code is using the components TIdTCPClient and TIdTCPServer, Just curious, why are you converting from Indy to ICS? Are you having a problem with Indy? 2 Share this post Link to post
jbWishmaster 2 Posted March 29, 2019 Thank you for your answers, I will try it on the weekend when I have more time. Share this post Link to post
jbWishmaster 2 Posted April 11, 2019 so i did some testing using the OverbyteIcsTWSChat demo and it worked as expected, at least it connected between my x2 main computers and virtualbox. however when i tried it at work it didn't connected at all. and I used the same IP and port number as the demo posted above which works without problems. as far as I understand it the Port and IP are not blocked, At work I have several MS Surface tablets which I can use for testing. but so far I have no luck. so if someone has an idea on how to fix it, perhaps I miss something!? Share this post Link to post
FPiette 385 Posted April 11, 2019 Check the firewall rules on each local computer, and check the firewall in the company infrastructure. Ask the system administrator to open the port you are using and to allow the application and routing of the traffic. Share this post Link to post
Tom F 85 Posted April 11, 2019 Mostly on-topic question: how is it that commercial remote control programs (Zoom, GotoMyPC, WebEx) seem to be able to get around most firewalls without help from IT? Share this post Link to post
jbWishmaster 2 Posted April 11, 2019 @FPiette as I explained already " the Port and IP are not blocked" otherwise the first demo I posted would not work either. there must be something else that I have overlooked. Share this post Link to post
Emil Mustea 6 Posted April 12, 2019 (edited) 12 hours ago, Tom F said: Mostly on-topic question: how is it that commercial remote control programs (Zoom, GotoMyPC, WebEx) seem to be able to get around most firewalls without help from IT? These programs first they try a direct connection - if the port is not blocked it works, if it's blocked and the router/firewall is UPnP, it adds an inbound rule which grants exterior access only for the lifetime of the program. Don't expect your company router to be UPnP enabled. If direct connection doesn't succeed then third-party server owned by TeamViewer/GotoMyPC/WebEx/etc is used as a middle man forwarding messages between those 2 parties, but usually works with direct connection. Establishing connection is not the hard part, having a very good real-time algorithm for capturing/transferring images/mouse without flicker/lag from one party to another is the hard part. Edited April 12, 2019 by Emil Mustea 1 Share this post Link to post
FPiette 385 Posted April 12, 2019 16 hours ago, jbWishmaster said: I explained already " the Port and IP are not blocked" otherwise the first demo I posted would not work either. there must be something else that I have overlooked. I understood that your first test which succeeded was using a set of computers and a given network and that the second test use a different network - a company network- and probably other computers. IMO, with the second test, you have something blocking in the network managed by the company. The routs between the two computers may be complex inside a company, with routers, bridges, WAN, firewall and more. I suggest you get a simple Ethernet switch and connect the two computers under test directly on that switch or directly connect the two computers at each end of a single cable (a cross cable if the Ethernet cards are not able to sense I/O). Then verify that the software works as expected. If this succeed, it means everything is OK with the two computers and the software. Be sure that the two computers have their IP address in the same range (Use IPConfig to check that). Then connect the two computers on the company network and test if the software still work. If it doesn't then something in the company network is blocking the traffic you want to create (This is frequent in a company network where security is a concern). If it doesn't work, ask the system administrator. Note that the problem is even more complex if the two computers are separated by a router. All those problems are NOT related to ICS. They are just normal behaviour of a LAN/WAN based on IP protocol family. Share this post Link to post
FPiette 385 Posted December 24, 2019 @jbWishmaster did you finally solved your problem? If so, what was the real issue, what have you done to solve it? Having the solution in the message thread is very useful for others... Share this post Link to post