[twsocket] Some socket problems

2007-06-28 Thread A Drent
I want to create a webapplication and use TWSocket to ask questions to a
remote server. If I create a cgi application it works well. But if I want to
test the application under webappdebug things go wrong:

I 've got a WebModuleBeforeDispatch event where I do the connection to a
remote server.
After receiving sessionavailable I send a command to the server.
The answer is retrieved (dataavailable)
on 'sessionclosed' I assume the anser is ready and given back to the
webserver.

However the first time it goes well, but refreshing a page gives me
Error 10022 in function WSAAsyncSelect Invalid argument

I've tried to add a close, closedelayed, abort, shutdown etc. in the
sessionclosed event, but this does not help. Also I found that after the
first call the component thinks that I have not set the port, protocol and
ip. So I need to setup the connection on every time I need to connect.

I know I'm doing something stupid, but what's going on?

albert


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] TWSocketServer

2007-06-28 Thread Engi

Hi,
 
Is a TWSocketServer can manage several port ?
 
Engi

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocketServer

2007-06-28 Thread Dod
Hello Engi,

I think you must create one instance of TWSocketServer per port.

E Is a TWSocketServer can manage several port ?
 
E Engi

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Some socket problems

2007-06-28 Thread Wilfried Mestdagh
Hello,

 However the first time it goes well, but refreshing a page gives me
 Error 10022 in function WSAAsyncSelect Invalid argument

You probably have a wrong pointer somewhere or destroyed something where
still a reference is to.

 after the
 first call the component thinks that I have not set the port, protocol and
 ip. So I need to setup the connection on every time I need to connect.

Yes you have to assign Addr and Port before each call to connect.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, June 28, 2007, 11:40, A Drent wrote:

 I want to create a webapplication and use TWSocket to ask questions to a
 remote server. If I create a cgi application it works well. But if I want to
 test the application under webappdebug things go wrong:

 I 've got a WebModuleBeforeDispatch event where I do the connection to a
 remote server.
 After receiving sessionavailable I send a command to the server.
 The answer is retrieved (dataavailable)
 on 'sessionclosed' I assume the anser is ready and given back to the
 webserver.

 However the first time it goes well, but refreshing a page gives me
 Error 10022 in function WSAAsyncSelect Invalid argument

 I've tried to add a close, closedelayed, abort, shutdown etc. in the
 sessionclosed event, but this does not help. Also I found that after the
 first call the component thinks that I have not set the port, protocol and
 ip. So I need to setup the connection on every time I need to connect.

 I know I'm doing something stupid, but what's going on?

 albert



-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocketServer

2007-06-28 Thread Angus Robertson - Magenta Systems Ltd
 I think you must create one instance of TWSocketServer per port.
 Is a TWSocketServer can manage several port ?

Arno did start work on a new socket server that supported multiple ports,
useful for FTP with SSL where you may want to listen on two or more ports.


Angus
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocketServer

2007-06-28 Thread Francois Piette
  I think you must create one instance of TWSocketServer per port.
  Is a TWSocketServer can manage several port ?

 Arno did start work on a new socket server that supported multiple ports,
 useful for FTP with SSL where you may want to listen on two or more ports.


A work around is to use several TWSocketServer component and assign the same
event handlers to all component. Of course be sure to use sender argument
in each event to properly handle the correct component triggering the given
event.


Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Some socket problems

2007-06-28 Thread Francois PIETTE
There is a sample ISAPI DLL included with ICS-V5.
Have a look !

--
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

- Original Message - 
From: A Drent [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Thursday, June 28, 2007 11:40 AM
Subject: [twsocket] Some socket problems


I want to create a webapplication and use TWSocket to ask questions to a
 remote server. If I create a cgi application it works well. But if I want 
 to
 test the application under webappdebug things go wrong:

 I 've got a WebModuleBeforeDispatch event where I do the connection to a
 remote server.
 After receiving sessionavailable I send a command to the server.
 The answer is retrieved (dataavailable)
 on 'sessionclosed' I assume the anser is ready and given back to the
 webserver.

 However the first time it goes well, but refreshing a page gives me
 Error 10022 in function WSAAsyncSelect Invalid argument

 I've tried to add a close, closedelayed, abort, shutdown etc. in the
 sessionclosed event, but this does not help. Also I found that after the
 first call the component thinks that I have not set the port, protocol and
 ip. So I need to setup the connection on every time I need to connect.

 I know I'm doing something stupid, but what's going on?

 albert


 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be 
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be