Jump to content

virtual channel implementation


Recommended Posts

Posted

I'm trying to implement a pair of components to handle communication over a

virtual channel. I believe I have the client component done okay, and it

sends a string on the virtual channel. On the server side, the second

component is waiting for the read. But it never receives anything. All calls

on both sides (open/write on client, and open on server side pass ok... )

 

So I have a few general questions, hopefully someone can help:

 

1. Is it okay to activate the server component manually (for test purposes)?

It is currently implemented as a console app.

 

2. the client sends data right after VirtualChannelOpen returns okay. I do

see the event coming back as "write complete". On the server, I open the

channel and wait for input. I then disconnect and reconnect the session. This

triggers the write from the client side. THe client does a

ReadFile/WaitForSingleHandle/GetOverlappedResult (or variations thereof) but

the handle never gets signaled. Am I missing something? Will the handles I

got on the server side before the disconnect be valid after I reconnect again?

 

I didn't see any different behavior registering the server component in the

registry. It is currently registered, but even if it weren't, it still fails

the same way. What does that registration do anyway?

 

fwiw, the client is vista, server is W2003.

  • Replies 2
  • Created
  • Last Reply
Guest Ramasamy Pullappan [MSFT]
Posted

Re: virtual channel implementation

 

See if this helps:

http://blogs.msdn.com/ts/archive/2007/09/20/dynamic-virtual-channels.aspx

 

ram.

 

--

This posting is provided "AS IS" with no warranties, and confers no rights.

 

"v.mont" <vmont@discussions.microsoft.com> wrote in message

news:420B8C02-43ED-4A51-8475-35F825E7AE3B@microsoft.com...

> I'm trying to implement a pair of components to handle communication over

> a

> virtual channel. I believe I have the client component done okay, and it

> sends a string on the virtual channel. On the server side, the second

> component is waiting for the read. But it never receives anything. All

> calls

> on both sides (open/write on client, and open on server side pass ok... )

>

> So I have a few general questions, hopefully someone can help:

>

> 1. Is it okay to activate the server component manually (for test

> purposes)?

> It is currently implemented as a console app.

>

> 2. the client sends data right after VirtualChannelOpen returns okay. I do

> see the event coming back as "write complete". On the server, I open the

> channel and wait for input. I then disconnect and reconnect the session.

> This

> triggers the write from the client side. THe client does a

> ReadFile/WaitForSingleHandle/GetOverlappedResult (or variations thereof)

> but

> the handle never gets signaled. Am I missing something? Will the handles I

> got on the server side before the disconnect be valid after I reconnect

> again?

>

> I didn't see any different behavior registering the server component in

> the

> registry. It is currently registered, but even if it weren't, it still

> fails

> the same way. What does that registration do anyway?

>

> fwiw, the client is vista, server is W2003.

>

>

>

Posted

Re: virtual channel implementation

 

 

Thank you. It helps, except that I'm not using a dynamic vc, i'm using a

regular (?) vc.

 

So I got it almost working. I can get the channel connect/disconnect

messages, establish the channel, and sometimes even exchange data over the

channel. but that's where my remaining issue is.

 

What I'm not understanding is this: My virtual channel client dll sends a

"hello" string to the server component right after the channel is established

correctly. So I log in, start the server from the command line, and the

channel is established. then I disconnect and reconnect. At reconnect, the

client sends the string correctly (and I get write complete handler fired),

but the server may or may not receive it. Disconnecting and reconnecting

gives me about a 25% chance that the server component will receive the

string, even though the client component sends it every time. Most of the

time the server is blocking, not getting any data (although it does see the

channel connects and disconnects)

 

So I'm missing something here, that I'm not understanding. A timing issue?

Stale handles? Why would the client say it wrote, and the server not receive

even one byte randomly, even though both ends say the channel is established?

 

 

"Ramasamy Pullappan [MSFT]" wrote:

> See if this helps:

> http://blogs.msdn.com/ts/archive/2007/09/20/dynamic-virtual-channels.aspx

>

> ram.

>

> --

> This posting is provided "AS IS" with no warranties, and confers no rights.

>

> "v.mont" <vmont@discussions.microsoft.com> wrote in message

> news:420B8C02-43ED-4A51-8475-35F825E7AE3B@microsoft.com...

> > I'm trying to implement a pair of components to handle communication over

> > a

> > virtual channel. I believe I have the client component done okay, and it

> > sends a string on the virtual channel. On the server side, the second

> > component is waiting for the read. But it never receives anything. All

> > calls

> > on both sides (open/write on client, and open on server side pass ok... )

> >

> > So I have a few general questions, hopefully someone can help:

> >

> > 1. Is it okay to activate the server component manually (for test

> > purposes)?

> > It is currently implemented as a console app.

> >

> > 2. the client sends data right after VirtualChannelOpen returns okay. I do

> > see the event coming back as "write complete". On the server, I open the

> > channel and wait for input. I then disconnect and reconnect the session.

> > This

> > triggers the write from the client side. THe client does a

> > ReadFile/WaitForSingleHandle/GetOverlappedResult (or variations thereof)

> > but

> > the handle never gets signaled. Am I missing something? Will the handles I

> > got on the server side before the disconnect be valid after I reconnect

> > again?

> >

> > I didn't see any different behavior registering the server component in

> > the

> > registry. It is currently registered, but even if it weren't, it still

> > fails

> > the same way. What does that registration do anyway?

> >

> > fwiw, the client is vista, server is W2003.

> >

> >

> >

>

>


×
×
  • Create New...