Socket control with Indy9?

Posted on 2004-11-09
Medium Priority
Last Modified: 2008-02-01
Is it possible to actually control connections at the socket level while using Indy 9 server components? If so, how? :)

What I wish is when a client tries to connect to, for example, an IdTelnetServer, is to allow or deny the connection based on an IP whitelist at the point of accepting the socket connection (similar to returning an INVALID_SOCKET with a WSAECONNREFUSED error from a WSAAccept call? )

Accepting the connection and then disconnecting is not appropriate.

Question by:dmasque
1 Comment

Accepted Solution

DeerBear earned 1000 total points
ID: 12547533

If you look at the OnConnect event, you can see a TIdPeerThread parameter.
It has a "socket" property that you can use.

Have fun :-)



Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month16 days, 10 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question