473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 3457

"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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.