Solved

Problem with ISAPI DLL

Posted on 2001-08-14
2
200 Views
Last Modified: 2010-04-06
I am writing an ISAPI DLL and want it to connect to another program via a TClientSocket.
I am using a WebModule, drop on a socket component and have it open the socket in the beforeDispatch event.
then in the event of the action I have it send a string to the other app(which has a TServerSocket component in it)
now here's where the problem arises....
the dang thing never actually connects to the server...the address/port settings are correct, the socket just never gets opened.
to confirm this, I have the dll write to a file when it enters each procedure...and the onConnect procedure for the client socket never gets called(the Lookup procedure does)

I am at a loss, anyone have any ideas?
0
Comment
Question by:ckaneta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
KobiK earned 300 total points
ID: 6386166
Just a thoght...
I think you need to use ClientType=ctBlocking in your ISAPI DLL (extension?)
meening you should use synchronic connection to the server or else the request to the ISAPI is done and onConnect will never fire if you use it asynchronicaly (ctNonBlocking is the default ClientType)

Something like this:
--------------------
  ClientSocket1.Address := '127.0.0.1';
  ClientSocket1.Port := 1234;
  ClientSocket1.ClientType := ctBlocking;
  try
    try
      ClientSocket1.Open;
      //WriteLog('OPENED');
    except
      //WriteLog('ERROR');
    end;
  finally
    ClientSocket1.Close;
    //WriteLog('CLOSED');
  end;

HTH
0
 
LVL 3

Author Comment

by:ckaneta
ID: 6394654
I suspect you're right and that's just too damn bad because I can't have it be a Blocking socket...it needs to be NonBlocking.

I'll give it a day or so more to see if anyone has anything else to say.

Thanks for the answer, If it turns out that this is the only way to go, I may be back asking for more specifics on Blocking vs. NonBlocking sockets.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

762 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