Author |
Message |
Bria #1 / 8
|
 Winsock
Greetings, I've been trying to work with the Winsock control and encounter an error with the "ConnectionRequest" event and the "Winsock1.accept" method; an error screen pops up complaining that the operation "Accept" is invalid at the current state. =\ I obviously can't get Winsock to accept the connection without this method, can anyone suggest a solution? Thanx, -Brian
|
Thu, 27 Feb 2003 23:00:21 GMT |
|
 |
Jalil Vaidy #2 / 8
|
 Winsock
You have to call Winsock1.Close before calling Winsock1.Accept. Quote:
>Greetings, > I've been trying to work with the Winsock control and encounter an error >with the "ConnectionRequest" event and the "Winsock1.accept" method; an >error screen pops up complaining that the operation "Accept" is invalid at >the current state. =\ I obviously can't get Winsock to accept the >connection without this method, can anyone suggest a solution? > Thanx, > -Brian
|
Sat, 01 Mar 2003 10:17:34 GMT |
|
 |
Bria #3 / 8
|
 Winsock
Hm... so first i *close* the socket, then i accept the connction? =) It doesn't make sense, but i trust you and i'll try it out. ; ) Thanks, -brian
Quote: > You have to call Winsock1.Close before calling Winsock1.Accept.
> >Greetings, > > I've been trying to work with the Winsock control and encounter an error > >with the "ConnectionRequest" event and the "Winsock1.accept" method; an > >error screen pops up complaining that the operation "Accept" is invalid at > >the current state. =\ I obviously can't get Winsock to accept the > >connection without this method, can anyone suggest a solution? > > Thanx, > > -Brian
|
Sat, 01 Mar 2003 23:33:10 GMT |
|
 |
Jalil Vaidy #4 / 8
|
 Winsock
Yep, thats the way Winsock Control works. Do it to believe it. Quote:
>Hm... so first i *close* the socket, then i accept the connction? =) It >doesn't make sense, but i trust you and i'll try it out. ; ) > Thanks, > -brian
>> You have to call Winsock1.Close before calling Winsock1.Accept.
>> >Greetings, >> > I've been trying to work with the Winsock control and encounter an error >> >with the "ConnectionRequest" event and the "Winsock1.accept" method; an >> >error screen pops up complaining that the operation "Accept" is invalid >at >> >the current state. =\ I obviously can't get Winsock to accept the >> >connection without this method, can anyone suggest a solution? >> > Thanx, >> > -Brian
|
Sun, 02 Mar 2003 11:43:30 GMT |
|
 |
Bria #5 / 8
|
 Winsock
2min... You must be using a *different* version of Visual Basic 5.0 than i am, or atleast a different Winsck.ocx version. Mine took a max of a few seconds. =\ *keep it real* -Brian
Quote: > Under VB5, closing a used socket took a while (2 min. or so) > until the socket control became reusable. Check the socket's > state (sckClosed) before re-using it. > Alex
> > Yep, thats the way Winsock Control works. Do it to believe it.
> > >Hm... so first i *close* the socket, then i accept the connction? =) It > > >doesn't make sense, but i trust you and i'll try it out. ; ) > > > Thanks, > > > -brian
> > >> You have to call Winsock1.Close before calling Winsock1.Accept.
> > >> >Greetings, > > >> > I've been trying to work with the Winsock control and encounter an > > error > > >> >with the "ConnectionRequest" event and the "Winsock1.accept" method; > an > > >> >error screen pops up complaining that the operation "Accept" is > invalid > > >at > > >> >the current state. =\ I obviously can't get Winsock to accept the > > >> >connection without this method, can anyone suggest a solution? > > >> > Thanx, > > >> > -Brian
|
Sun, 02 Mar 2003 03:00:00 GMT |
|
 |
Alexander Kienzl #6 / 8
|
 Winsock
Under VB5, closing a used socket took a while (2 min. or so) until the socket control became reusable. Check the socket's state (sckClosed) before re-using it. Alex
Quote: > Yep, thats the way Winsock Control works. Do it to believe it.
> >Hm... so first i *close* the socket, then i accept the connction? =) It > >doesn't make sense, but i trust you and i'll try it out. ; ) > > Thanks, > > -brian
> >> You have to call Winsock1.Close before calling Winsock1.Accept.
> >> >Greetings, > >> > I've been trying to work with the Winsock control and encounter an > error > >> >with the "ConnectionRequest" event and the "Winsock1.accept" method; an > >> >error screen pops up complaining that the operation "Accept" is invalid > >at > >> >the current state. =\ I obviously can't get Winsock to accept the > >> >connection without this method, can anyone suggest a solution? > >> > Thanx, > >> > -Brian
|
Sun, 02 Mar 2003 18:29:00 GMT |
|
 |
Alexander Kienzl #7 / 8
|
 Winsock
Maybe I was using another OS (Win98/Win95)? Anyway, it takes a while... Alex
Quote: > 2min... You must be using a *different* version of Visual Basic 5.0 than i > am, or atleast a different Winsck.ocx version. Mine took a max of a few > seconds. =\ > *keep it real* > -Brian
> > Under VB5, closing a used socket took a while (2 min. or so) > > until the socket control became reusable. Check the socket's > > state (sckClosed) before re-using it. > > Alex
> > > Yep, thats the way Winsock Control works. Do it to believe it.
> > > >Hm... so first i *close* the socket, then i accept the connction? =) > It > > > >doesn't make sense, but i trust you and i'll try it out. ; ) > > > > Thanks, > > > > -brian
> > > >> You have to call Winsock1.Close before calling Winsock1.Accept.
> > > >> >Greetings, > > > >> > I've been trying to work with the Winsock control and encounter an > > > error > > > >> >with the "ConnectionRequest" event and the "Winsock1.accept" method; > > an > > > >> >error screen pops up complaining that the operation "Accept" is > > invalid > > > >at > > > >> >the current state. =\ I obviously can't get Winsock to accept the > > > >> >connection without this method, can anyone suggest a solution? > > > >> > Thanx, > > > >> > -Brian
|
Tue, 04 Mar 2003 03:00:00 GMT |
|
 |
Robert Mah #8 / 8
|
 Winsock
Set the localport to 0 first, theres something about non-zero ports taking 4 mins to time out (some RFC I forget). Then close it. out of interest, try looking at the state while you do things, I've found it well worth putting in; do while winsock.state <> sckConnected doevents loop just to make sure it is where it should be. Hope this helps and is applicable to your problem Robo
Quote: >Maybe I was using another OS (Win98/Win95)? >Anyway, it takes a while... >Alex
>> 2min... You must be using a *different* version of Visual Basic 5.0 than i >> am, or atleast a different Winsck.ocx version. Mine took a max of a few >> seconds. =\ >> *keep it real* >> -Brian
>> > Under VB5, closing a used socket took a while (2 min. or so) >> > until the socket control became reusable. Check the socket's >> > state (sckClosed) before re-using it. >> > Alex
>> > > Yep, thats the way Winsock Control works. Do it to believe it.
>> > > >Hm... so first i *close* the socket, then i accept the connction? =) >> It >> > > >doesn't make sense, but i trust you and i'll try it out. ; ) >> > > > Thanks, >> > > > -brian
>> > > >> You have to call Winsock1.Close before calling Winsock1.Accept.
>> > > >> >Greetings, >> > > >> > I've been trying to work with the Winsock control and encounter >an >> > > error >> > > >> >with the "ConnectionRequest" event and the "Winsock1.accept" >method; >> > an >> > > >> >error screen pops up complaining that the operation "Accept" is >> > invalid >> > > >at >> > > >> >the current state. =\ I obviously can't get Winsock to accept the >> > > >> >connection without this method, can anyone suggest a solution? >> > > >> > Thanx, >> > > >> > -Brian
|
Tue, 04 Mar 2003 03:00:00 GMT |
|
|
|