Mono Compatible Networking/Socket Library [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Are there any Mono (C#) compatible networking / socket libraries out there?
Preferably something that is:
Multi Threaded
Event Driven
Capable of multiple connections
Handles client and server pieces
Runs on Mono and MS .NET runtimes
Very simple
Free (And usable in commercial software)
It would also be really great if it was:
.NET Compact Framework (Windows Mobile) compatible
MonoTouch (iPhone) compatible
Edit:
To clarify more, what I meant by my "one level above TCP/IP" comment was that I want something that is basically a self contained server / client. I don't want to have to deal with writing the threading code, handling each connection, etc. For example, I would love for the code to look like this:
Server s = new Server(8080);
s.NewConnection += new ConnectionEventHandler(NewConnection);
s.DataRecieved += new DataEventHandler(NewData);
s.Start();
void NewConnection(object sender, EventArgs e)
{
s.Send((Connection)sender, "Hello World!"); //(Connection)sender is the connection instance so the server knows which to send the response to
}
void NewData(object sender, EventArgs e)
{
s.Send((Connection)sender, e.Data); //Echo back
}
Not the cleanest code, but I think it gives the basic idea.

Something like this now exists, checkout networkComms.net. Does all of the things you require and is also 100% compatible with mono.
Disclaimer: I am one of the developers for this commercial library.

No, there is nothing out of the box that does what you want.
TcpClient/TcpListenr are already one level above Socket class. If you really want something that is even simpler, it is a very easy task to wrap TcpListener() and make it expose the event handler entry points that you want.

You should check out RemotingLite. I use it with my Mono applications. It was developed to aid in the networking aspect of the Distributed Computing Library MPAPI. MPAPI had a goal of being 100% compatible with Mono.

I am not clear as to what exactly you expect from a class that is "one level above TcpClient and TcpListener"?
TcpClient/TcpListener are the basic building blocks you should use for development. I am not sure if they are supported in Mono as well, but if they are, then it should be all you need.
.Net CompactFramework also supports these, although I am not sure about Mono Touch.

Related

Looking for a Static Code Analysis Tool For Concurrency in .NET like CheckThread for java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I am implementing a concurrent .NET data structures in c# (like ConcurrentDictionary, BlockcingCollection etc.). It's not about just not forgetting to lock an object when accessing from different threads. It requires sophisticated locking strategies to maximize parallel execution time.
I know there is a tool, a kind of framework for systematic concurrency testing for .NET named CHESS.
Question: Is there also a tool which will find concurrency / threading issues through static code analyses? Something like CheckThread which is for java.
Here are a set of resources to help with concurrent programming...they are a mixture of static and runtime based tools.
Intel Inspector XE/Parallel Studio
Intel do some tools inside Parallel Studio that help with concurrent development, however their Parallel Advisor is only for C/C++.
But for C# you can do runtime thread checking with their Inspector XE (formerly Intel Thread Checker)
http://software.intel.com/en-us/articles/intel-inspector-xe/.
PRESharp (Microsoft Center for Software Excellence)
There appears to be something called PRESharp mentioned here:
http://www.microsoft.com/windows/cse/pa_projects.mspx
Now I haven't heard of that before...only the similar sounding PREFast which I have used to statically analyse some C driver code in the past. I suspect that it's an internal Microsoft tool that no one else gets to use unless you get special access.
Static Analysis Tools
A big list of static analysis tools here (e.g. FXCop).
What static analysis tools are available for C#?
and Typemock Racer mentioned here:
C#/.NET analysis tool to find race conditions/deadlocks
and of note is Coverity Prevent which claims to detect concurrency defects by statically analysing C/C++, Java or C# code (rated by NASA).
http://www.verifysoft.com/en_coverity_prevent_concurrency.html
http://www.theregister.co.uk/2012/08/22/mars_rover_software_coverity/)
WinDBG + SOSEX
Other tools to help with concurrent programming are WinDBG (part of the Windows Debugging Tools which is distributed inside the Windows SDK) which is more powerful than the Visual Studio debugger.
http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx
Note: you can now use a more powerful User Mode debugger from inside Visual Studio 2012 which has parity with WinDBG if you install the Windows Driver Kit 8 in your system.
http://msdn.microsoft.com/en-us/library/windows/hardware/gg487428.aspx
http://blogs.msdn.com/b/mariohewardt/archive/2012/06/05/visual-studio-2012-and-windbg-integration.aspx
You can also get plugins to WinDBG that extend it e.g. the SOSEX plugin adds the !dlk command which can help identify the cause of a deadlock.
http://stevestechspot.com/
http://blog.scriptico.com/04/debugging-with-windbg-deadlocks-in-applications/
Debugging a Deadlock with Windbg's !clrstack command
http://blogs.msdn.com/b/tess/archive/2008/02/11/hang-caused-by-gc-xml-deadlock.aspx
Concurrency Visualizer (in Visual Studio 2010+)
There is the Concurrency Visualizer in Visual Studio and an SDK to go with it.
http://msdn.microsoft.com/en-us/library/dd537632.aspx
http://blogs.msdn.com/b/visualizeparallel/archive/2011/10/17/introducing-the-concurrency-visualizer-sdk.aspx
http://msdn.microsoft.com/en-us/magazine/ee336027.aspx
http://msdn.microsoft.com/en-us/magazine/ee410778.aspx
General Concurrent Programming Design Considerations
http://msdn.microsoft.com/en-us/magazine/cc817398.aspx
http://msdn.microsoft.com/en-us/library/ff963553.aspx
http://msdn.microsoft.com/en-us/magazine/cc872852.aspx
http://msdn.microsoft.com/en-us/magazine/cc163744.aspx
http://www.packtpub.com/beginners-guide-for-C-sharp-2008-and-2005-threaded-programming/book
Video Resources
Here's a brilliant series of Videos that give you general advice on debugging .NET applications:
http://channel9.msdn.com/Series/-NET-Debugging-Stater-Kit-for-the-Production-Environment/Diagnosing-Application-Issues-01
I should add:
Model-Based Verification
This technique uses a formal model of your application's threading primitives, and tries to assert or disprove that the model has the properties that you desire, such as freedom from deadlocks.
One writes the model in a formal language, such as Promela and then proves properties of the model using a model checker such as Spin.
Verifying Reentrant Readers-Writers. Bernard van Gastel.
Reentrant Readers-Writers – a Case Study Combining Model Checking with Theorem Proving – ICIS Technical Report R08005. Bernard van Gastel, Leonard Lensink, Sjaak Smetsers and Marko van Eekelen.

what is the best tool for performance regression testing [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
our organization is looking for a tool to help with performance testing on each release. We ship a whole bunch of new software and we want to ensure that performance on key functions has not slowed down since the last prod release. We have code in C# and Java. This can be anything from:
when i run this function it takes < 2 seconds
when i run this set of functions the total < 5 seconds
etc . .
Is it best to do this using our basic unit testing continuous integration (nunit, junit, team city) with hand written performance checks or are there specific tools that can help focus on on this area.
Any suggestions?
On my projects (which tend to use Spring), I use the AOP and the PerformanceMonitorInterceptor.
While you may not use Spring, it's definitely some good code to look at and can base a version of your own. I found AOP perfect for this situation because it does not clutter up the actual function calls. If you have a tiered application, then you can put these performance monitors at each level. (Typically for my webapps, I put it as my data access layer so I can monitor database query performance.)
You could try soap ui if your app is remotely accessible:
http://www.soapui.org/userguide/loadtest/index.html
It'll give you all the sort of stats your after:
http://www.soapui.org/userguide/loadtest/images/loadtest_editor.gif
What we use is python to write scripts + extensive logging to generate XML logs which can be then imported into spreadsheet.
I have been tinkering with a tool called 'Basher' that allows you to write "tasks" that are picked up by the system and subsequently run for a configurable amount of time (to allow the JVM to warm up for example) and then performs a run, recording task execution time, averages and the like.
The 1.0 version has been quietly around for a while and if you care to take a look, it is available at http://basher.sourceforge.net
The trunk version contains some improvements - there is maven integration, with configurations being specified in the pom.xml, the bare bones of a reporting framework, etc.

Has anyone used the AS2 protocol for EDI? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I don't know if anyone can point me in the right direction of writing code to send a file by AS2?
A colleague of mine wrote a C# implementation of AS2 for one of our clients some time ago (he used .NET 1.1) so I can tell you that what you want to do is certainly achievable.
To do this you would need to get a copy of the AS2 RFC as well as any other RFCs that the AS2 one references (the various HTTP ones for example).
You will also need something to test your work against - some other implementation of AS2 that you can send your messages to.
This is the approach my colleague followed and at the end of the process he had made an AS2 transport which has been in production for around 7 years, dealing with several multi-national companies who used Drummond certified products.
You do not absolutely need to go down this track - you can send a valid AS2 message just by supplying the right AS2 headers in an HTTP post, but then you would only be implementing a bare minimum subset of the AS2 standard, which would not include the encryption, authentication and non-repudiation aspects of the protocol that make it worth using.
If you only want to send AS2, perhaps with basic encryption and signing, this could be feasible.
I would, however, strongly advise against you writing your own AS2 implementation unless you a) absolutely must or b) are sure you will only be sending basic messages with simple encryption and signing.
I say this because:
The code is non trivial
You will run into issues around certification
The certification issue is possibly the biggest hurdle. All the big vendor AS2 offerings (e.g. Gentran, WebSphere, BizTalk) are Drummond certified. What this means is that they have passed a series of tests administered by the Drummond Group Inc. establishing that their implementation of AS2 can interop with all other implementations.
Drummond certification is a time consuming and costly process, and without it you are always viewed as being suspect. Even if you implement a flawless AS2 sender, your code will always be the place fingers are pointed.
As far as alternatives go, there are several free or relatively inexpensive AS2 implementations like OpenAS2 (only Java) or Boomi (commercial but not too expensive) up to full blown B2B engines like Websphere and BizTalk.
I've not heard of AS2Box previously, but it does sound like it could meet your needs (though typically people using AS2 would not want to go through an untrusted third party).
As with anything, it really depends on the specifics of what you need to do.
This is a bit late, but for keeping this answer up to date: Now with Azure Biz Talks services, it's not too bad just to use BizTalk. Here is a good example:
http://code.msdn.microsoft.com/windowsazure/Windows-Azure-BizTalk-EDI-8ebd429f

choosing a diagramming library for .Net [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have a customer who needs to convert a diagramming application (which was developed in MFC a long time ago) to C#.
The application displays large networks (lots of graphical elements), and lets the user edit/manipulate the data through a graphical ui.
I decided that it would be best to use a library rather than to develop all from scracth (all graphic objects/selection/tools/events/etc)
I am looking for a commercial solution.
I found three that seem to be very mature, and I wonder if
anyone had used them and can write his/her opinon:
Tom Sawyer Visualization
IBM ILog Diagrammer for .Net
yWorks - yFiles for .Net
thanks
Yaron
I am not familiar with this libraries, but one of my old projects we have use GoDiagram library, and can suggest that too
For making good looking diagrams in .Net you should check out Frank Hileman's VG.Net. He's a reputed MVP and I believe his solution is really good:
http://www.vgdotnet.com/
I recommend MindFusion's Flowchart.NET. It's very easy to use and is very affordable considering it comes with a multitude of powerful layouting algorithms. Previously we used GoDiagram, but I recommend against it because their licensing system is a nightmare if you have build machines, and it's much more expensive.
I believe Dundas charts is the most famous one...or at least the most advertised one:
http://www.dundas.com/Microsite/ChartNET/Default.aspx?Campaign=GoogleCSharpChart&gclid=CM-wncOq354CFUmK3godxENfMQ
I know this probably isn't the best solution but I'm going to put it out there anyway.
I've done something similar to this using .Net's System.ComponenetModel.DesignSurface. This is the same design service used in Visual Studio's Windows Forms so all you do is create your controls, add your control designers if you want and you're good to go. You can use the PropertyGrid to display the data for each object as they are selected. Code Project has several articles about this like this one.
That said it's not going to be the best performance wise, I've got several thousand controls on my DesignSurface in some cases and it gets sluggish. You may be able to get around this by using another root designer type (WPF maybe?).
This could be a very good option if you already know how to do custom Windows Forms controls. And best of all it’s free!
Have a look at Orbifold. They have got WPF based solutions (commercial) or libraries supporting GDI+ (free).
It's also a good starting point for information about diagramming algorithms in general.

Best guide for creating Windows Services in C# .NET? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking to convert a small .NET console application into a Windows Service. I'd like to build two versions, one using .NET 2.0 and another with .NET 3.5 .
Are there radically different approaches that need to be taken, or will the 2.0 version be roughly equivalent to the 3.5 version? Where's a good source of information (i.e. a web-based guide) that can walk me through the steps of setting up the service?
Thanks!
P.A.
Actually, .NET 3.5 does change the C# code a little. For example, you can use the var keyword, and you can use the hidden private variables for properties. It is still based on CLR 2.0.
There is a pretty good article at msdn that talks about windows services and walks you through building one.
To supplement Rick's answer, I'd suggest the MSDN Walkthrough
It is incredibly verbose and touches on event logging as well as an installer.
The thing to remember is that .NET 3.5 is a set of additional libraries on top of .NET 2.0, so, unless you are planning on taking advantage of any additional features provided by .NET 3.5 (or .NET 3.0) like LINQ or WCF the code would be identical.
Try looking at the documentation for ServiceBase, which is the base class that you will need to inherit, to get things started.
This I believe is a decent walk through with screenshots and code samples. I think it may have been what I used for the first windows service I wrote. I think it was written back in .NET 1.1, but should still help walk you through the process. As far as the differences between 2.0 and 3.5, I would say there can/will be as much difference as you want there to be. I don't believe you will be required to change anything, but as other posters have mentioned and as you can find all over SO, there are a lot of new features that can be very beneficial that came with .NET 3.5.
There is at least one place where service code will need some attention to make it work in .net2/vs2005 vs. .net35/vs2008.
This is especially true if you write your service and installer using in c# 2.0 and compile and deploy using .net35/vs2008, the link below might save you a bit of time:
Custom Actions Changed
Here is guide to learn about windows service.

Categories

Resources