Solved

Problem with ISAPI DLL

Posted on 2001-08-14
2
203 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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month11 days, 3 hours left to enroll

628 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