Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
is there a Bible for Sockets programming in .NET that utilizes the 3.0 or later framework? An example of the caliber that I am looking for should be on the level of Concurrent Programming on Windows by Joe Duffy if this were a .NET threading and concurrency question.
C# is my prefered source code book samples but any language on the .NET framework are welcome.
I'm looking for a book, but if there exists a website or blog of similar content, they are welcome too.
I've purchased and read this book:
TCP/IP Sockets in C#: A Practical Guide for Programmers
http://www.amazon.com/TCP-IP-Sockets-Practical-Programmers/dp/0124660517/ref=pd_cp_b_1_img
Its not specific to 3.0, but its a very good book - covers most of what you'd expect to see, and as a beginner to sockets (like I was) it answers the questions you find yourself trying to Google :-)
Shameless self-promotion: I maintain a FAQ on .NET TCP/IP on my blog. It covers things that a lot of books skip over (in particular, proper application protocol design). It doesn't cover things like comparing the three socket APIs (synchronous, async via Begin/End, async via Async) or higher-level APIs (TcpClient, NetworkStream, etc).
CPoW is pretty hefty. I doubt there's a .NET sockets book that addresses the subject to that depth (though I haven't read Adam's recommendation). The best resources I've found are just the classic socket books (e.g., Stevens volume 1). Since the Socket class is almost exactly a 1:1 mapping to WinSock calls, this approach worked quite well for me.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have already created my server in System.Net.WebSockets and now after transferring it between machines I had noticed Windows Server 2008 is not supported, are there any other implemetations which support an X509Certificate as authentication and would require minimal conversation.
I have been googling for this in the past 2 hours but haven't found anything meaningful, just a collection of poorly written, poorly documented libraries that throw exceptions on the regular, specifically SuperSocket, the server implementation of which seems to be complete buggy bull.
Could anyone post some sample client code from a decent library? I am growing desperate.
Frameworks include:
SignalR
XSockets
Super WebSocket
Alchemy WebSockets
Fleck
More options available via the realtime web tech guide
I know it is a little bit late, but I created a WebSocket C# implementation and it may be interesting for somebody.
There is also:
https://github.com/sta/websocket-sharp - sharp implements RFC6455 and is very popular amongst Unity3d developers
https://github.com/StackExchange/NetGain/ - stackoverflow's implementation of RFC6455
SignalR provides you a great way to add real-time features to your application. Under the hood, it uses either Web Sockets, Server-sent events, Long Polling or Forever Frames based on what the client and the server support. The coming version, scheduled to be released in the coming weeks, will support client-side (X509Certificate) certificates. You can refer to the following links for more details:
http://www.asp.net/signalr
https://github.com/SignalR/SignalR/wiki
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm looking for a library / framework that would allow me to easily achieve this:
Minimal message size (ideally something like - [16 bit message id] + [variable length message parameters]).
Needs as little plumbing code as possible.
TCP communication.
Handles dozens of connections easily.
Bidirectional communication.
I would like to use WCF-like approach, in which I would create contracts (operations and data) and would share that assembly with both clients and server. Or maybe there are some minimalistic bindings I could use - something even lighter than NetTcpBinding?
Lidgren.Network is a very simple library which is easy integrated to any project. I've tried it out a little and it's very easy to use. Give it a try.
http://code.google.com/p/lidgren-network-gen3/
You might wanted to check out Photon http://www.exitgames.com/
For the protocol format, I would look into Google's ProtoBuffers. There are numerous languages supported, including C#. The serialization is small, wicked fast, extendable, and easily upgraded version over version.
As far as transport is concerned this can be more difficult. Frankly .NET's WCF is not up to the task. Raw TCP/IP built on Sockets is difficult to manage properly. Even building upon the TcpListener can prove difficult but it is possible.
So what's a good way to go? Well that is difficult to answer given the bi-directional requirement. I'm not sure I can point to any one library and say it has the right answer. There are several available and all have their strengths and weaknesses. A lot is going to depend on more specific requirements of your project. Good luck ;)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I want to start reading about multithreading and parallel computing in C# / .Net 4.0.
I understand the basics of multithreading so I'm looking for something that is going to provide more than just the basics. I'm also looking for something that is up to date with the changes in .Net 4.0.
Can you recommend a book?
Many thanks.
I suppose when it comes to anything in C#, I would recommend CLR via C#. It has got two chapters on threading-parallelprocessing which is a must read.
I would recommend Patterns for Parallel Programming: Understanding and Applying Parallel Patterns with the .NET Framework 4, which cover different senarios and implementation:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=86b3d32b-ad26-4bb8-a3ae-c1637026c3ee&displaylang=en
I'm making my way through http://www.albahari.com/threading/ which I find to be a very useful resource. It's been updated to cover the new parallel options in c# 4.0.
I would recommend this chapter from C# in nutshell 4.0, It's really a greate resource.
Good luck!
Concurrent Programming on Windows by Joe Duffy. It has everything you need to know about concurrency multi-threading including PLINQ.
This will be a good start: Parallel Computing Developer Center
A Tour Through the Parallel Programming Samples for .NET 4
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 months ago.
Improve this question
What books would you guys recommend if one has been a java developer for years and is now trying to take the c#/asp.net route?
First read this whitepaper:
C# From a Java Developers Perspective
Then, you can move onto books that cover the .NET framework, as you'll see the langauges differences are very quick to learn.
CLR Via C# is a great book for C# for people with experience programming. Especially experience in other managed languages
I have recently done exactly this and found the two most valuable books to be:
CLR via C# by Jeffrey Richter. Very well written and gives a great insight into the .net runtime - lots on the concepts you will already know from java such as garbage collection, threading, generics, etc. Plus really good in depth coverage of c# constructs like delegates and events that don't come with java (yet).
and
Pro C# and the .net 3.5 Platform by Andrew Troelsen. This is much more of a general text on the .net ecosystem. It has an excellent core language section, but then also gives a really good overview of the major libraries and apis - WPF, WCF, ASP.net, etc.
Those should provide you a solid foundation and are both pitched perfectly for the experienced programmer. After that, you'll probably end up looking for something more specific to the technology you are working in - a detailed ASP.net book in your case - but I constantly refer to both of these, so it is money well spent imho.
I find
Pro C# with .NET 3.0, Special Edition
by Andrew Troelsen
Apress © 2007 (1238 pages)
ISBN:9781590598238
to be an excellent book.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm porting old VB6 code that uses the Winsock control to C#. I haven't done any socket programming and I wonder if anyone has a good reference/tutorial/howto that I can use to start getting up to speed.
I'm appealing to the hive mind while I proceed with my generally unproductive googling.
I'm using UDP, not TCP at this time.
The August 2005 MSDN Magazine had an article about System.Net.Sockets and WinSock:
http://msdn.microsoft.com/en-us/magazine/cc300760.aspx
I recommend the asynchronous model for most applications, especially if you want performance or applications that don't hang as soon there is a network problem. For this the MSDN articles on Socket.BeginConnect and Socket.BeginReceive are good places to start.
The following link is not .NET, but many of the recommendations still hold: http://tangentsoft.net/wskfaq/articles/lame-list.html
MSDN is a good place to start
Are you working on:
a client (TCPClient)
or a server (TCPListener)
Just a heads up:
I would recommend first working with TCP rather than UDP. UDP doesn't automatically redeliver lost packets like TCP so it will add another element to the equation that will probably just confuse you as you're just starting out.
Building a socket client is relatively easy using the TCPClient class available in the .Net library. TCPListener is easy enough to use for a single client but if you're hoping to develop some server type application (IE: Handling multiple connections.) the real hurdle you'll have to overcome is understanding multithreading.
Once you've played around with single connection sockets I suggest you read up on multithreading.