question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

custom transport receiving issues

See original GitHub issue

Hi,

I’m trying to write a custom transport which works over a character device (in this case a serial port exposed by qemu into windows). The basic idea here is that I need to use CreateFile/ReadFile/WriteFile to transfer data over a “file” provided by the driver. In order to work with the file it has to be opened in “overlapped” mode, and by nature reads and write are asynchronous. I’ve implemented all of this wrapped in a Stream subclass, for writes I just send-and-forget, whereas for reads I have an internal long running Task which reads from the file periodically and buffers the results to an internal circular buffer.

For the past hour I’ve been scratching my head because my custom transport was throwing an ObjectDisposedException and I couldn’t for the life of my figure out where I had screwed the code up. It finally occurred to me to check the source for this library and I found the following: https://github.com/Azure/amqpnetlite/blob/master/src/Framing/Reader.cs#L56. What I think is happening is that AMQP.Net Lite is trying to make a read before the internal thread has picked up any response, getting a read size of 0 and throwing the ObjectDisposedException. I’m not sure how to get around this problem, so any help would be welcome!

Are there any specific notes on requirements for implementing a custom transport?

UPDATE: I should have mentioned this is being implemented against .NET 4.0

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
mbroadstcommented, Nov 3, 2016

@xinchen10 Great Happiness

Custom transport communicating over a virtio-serial port in windows on the right side. A small proxy I wrote using amqp10 in node.js on the top left, which proxies to a local qpidd instance. Bottom left is a listener using amq10 again to receive messages off the amq.topic exchange. Looks like the experiment worked 😃

0reactions
mbroadstcommented, Nov 3, 2016

I’m definitely willing to contribute code to that, this stuff is by no means proprietary or otherwise encumbered. Plus, I’d appreciate if someone who knows C# better than I would look it over for obvious inefficiencies 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom transport not capturing any messages with debug ...
Using the example from the README.md, my custom transport is not receiving any debug level messages. I've tried to call via these two...
Read more >
Working on a custom transport for WebRTC - client not ...
Hey, I'm working on a custom WebRTC transport for DOTS NetCode. ... server is receiving client connections (and this shows in the debugger)...
Read more >
Trouble Connecting to Custom Akka.NET Transport
Found the (current) issue. Examining the metadata for DotnettyTransport , I noticed it overrode the virtual SchemeIdentifier .
Read more >
DynamicData with a custom transport | Data Distribution ...
In doing so, one of the problems I ran into is that CustomTransportPlugin_on_endpoint_attached() registers a callback for creating data samples.
Read more >
Need Advice: Custom Transport Agent or...? - MS Exchange
Programmatically speaking, it is not an issue to get an email from Exchange, parse the body, generate the quote, and send an email....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found