472,958 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Winsock

Hello all

i need a solution to the following problem

I have an application which listens to a port for incoming connections from
a client via a Winsock. let's call this Winsock1

Upon a connection of a client i would like the application to call an
ActiveX.exe which also has a Winsock Control (Winsock2), and i would like to
transfer the Winsock1 information to Winsock2, hence allowing the client
now to talk
directly to the Winsock2 on the ActiveX control,
and hence freeing up the Winsock1 to start listening again.
And if another client connects then i would like the same to happen again.
So basically i would find a number of the activex.exe being called.
This would have to be Asynchronus i.e. both clients being processed
simultaneuously

TIA

Jul 17 '05 #1
1 3434

"N.Naeem" <nn****@REMTHISportech.co.uk> wrote in message
news:3f***********************@auth.uk.news.easyne t.net...
Hello all

i need a solution to the following problem

I have an application which listens to a port for incoming connections from a client via a Winsock. let's call this Winsock1

Upon a connection of a client i would like the application to call an
ActiveX.exe which also has a Winsock Control (Winsock2), and i would like to transfer the Winsock1 information to Winsock2, hence allowing the client
now to talk
directly to the Winsock2 on the ActiveX control,
and hence freeing up the Winsock1 to start listening again.
And if another client connects then i would like the same to happen again.
So basically i would find a number of the activex.exe being called.
This would have to be Asynchronus i.e. both clients being processed
simultaneuously

TIA

This is how I would attempt it

Create a ClientConnectionManager
Set up a Socket Array
Listen on Socket 0 for a connection at all times
When a request is received create (load) next free socket

Accept the client request to the newly created socket,
Winsock1(TheNextIndex).Accept ID
then immediately (in the same event)

Create a New AX instance & Call a method that creates a socket &
returns its random Listening port number example.Sub called
CreateSocketConn.

Example call
Winsock1(TheNextIndex).SendData "Use" & AXinstance.CreateSocketConn()

So first time the client successfully connects it will receive a random port
number where it can close the first connection & reconnect to the port the
AX will be listening on.
Other details would need to be incorporated no doubt
e.g. The AX shuts down after a certain time if the connection is not
successful.
and some event error handling bla....bla.......
HTH
Geoff
--



Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Niels Borg | last post by:
Hi, I'm writing app where I use WinSock, but I have experienced a problem. WinSock only sends the data after finishing the calling sub/function. Can I force WinSock immediately as I need to send...
4
by: Ophir | last post by:
Hello all ! I wrote a simple ActiveX DLL to wrap winsock functionality so I can use it in an ASP page. I call it MyWinSock In the Class module I use this declaration: Dim ctlSocket as...
1
by: Chris Thompson | last post by:
I'm trying to mess around with creating a multi-user server but I'm really clueless as to how to start. I don't know what I'd need to do, and more than likely it's over my head, but I'd still like...
3
by: Bill | last post by:
When vb6 Winsock.RemoteHost is set to "127.0.0.1", c# socket listener cannot hear connect request (my old vb6 winsock listener could hear it...). Why doesn't this work, and is there a work...
1
by: Yu Chai | last post by:
Hi guys, I created a ASP page that 1. users can run when WinSock proxy are using (ie's one is unchecked) 2. users can't run when WinSock proxy are using (ie's one is checked) 3. users can't run...
7
by: Nadav | last post by:
Hi I am writing some kind of a storage system that have to deal with large amounts of data passing over the net, Now, I Wonder... traditional programming would use win32 Winsock DLL as the means...
5
by: kc | last post by:
Hi Just upgrading a app from VB6 to VB.Net. All is going well apart from the Winsock control. The first thing we notice is that there does not appear to be a .Net version (please correct me if...
1
by: Nicolas Ghesquiere | last post by:
Hello I have a problem with my current program. The meaning of the program is to allow users to login to a server to allow them to access the internet. My program communicates with a MS isa...
4
by: imaloner | last post by:
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working,...
3
AaronL
by: AaronL | last post by:
Hello, I am currently working on a project that has me in sort of a bind. What I want to do is retrieve web pages from the internet, and strip them down to just text. I'll get using Regular...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.