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 am developing a very basic DNS server for my own purpose. The way I understand it, the DNS server receives UDP packets containing the requested domain name and returns the corresponding IP under some kind of standard form.
There is a standard library for reading/writing UDP packets from/to binary format. But where can I find a C# library for serialising/deserialising DNS requests/responses?
The open source ARSoft.Tools.Net library contains a DNS Server component (see documentation).
You could use this library directly, or just use the source as a starting point for building your own DNS request serializer.
As far as I can tell, I couldn't find a library for C# which handles DNS packet serialization/deserialization, which means it's likely you'll have to roll your own.
Edit: I came across this network packet sniffer project on Code Project which might have what you need. Claims to be able to to parse TCP/UDP/DNS
I did find this very helpful site for TCP/IP which has a pretty comprehensive set of pages describing DNS packet types including the general message format.
There might be some additional help from this previous SO question though.
If you look at wikipedia you find a list over all RFC's for the dns protocol, i find rfc's to be the best way to implement a network protocol!
now the dns protocol has rather many rfc's so i dont know if this is the best way to read up on the protocol but you get all the information you need atleast.
http://en.wikipedia.org/wiki/Domain_Name_System#Internet_standards
Related
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 looking for C# RESTful framework (best with json support), which is not based on WCF in any way. WCF requires me to create namespace reservations, and this is thing i'd like to avoid (i already tried Nancy). The thing is target PCs for my service are older Windows XP machines, where are registering tools missing (netsh has no http context).
Can anyone suggest me good solution?
Take a look here. it's really only an issue if you have a self hosted WCF service running along side IIS. Other then that, if you run inside IIS, you are the only thing listening to port 80, or you are listening to a different port, then you dont care about URL registration. you can also redirect the request from IIS to a different port on the same machine.
personally I really prefer WCF to all other and currently more popular alternatives, it gives you the best flexibility , and although it has a pretty significant learning curve, once you are "on top of the curve" gives you, in my opinion, the best "features developed / time invested" ratio
Excluding WCF, I think your best solution is this (as doan commented):ASP.Net Web Api combined with this (another site ) which is an open source project that microsoft pretty much adopted, and its all shown here
bare links:
http://msdn.microsoft.com/en-us/library/ms733768%28v=vs.110%29.aspx
http://www.asp.net/web-api
http://json.codeplex.com/
http://james.newtonking.com/json
http://www.asp.net/web-api/overview/formats-and-model-binding/json-and-xml-serialization
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 currently developing an application that is simillar to a simple bitmap graphics editor, like MS Paint.
The application is Windows Forms and I use different c# Graphics classes for drawing.
I wonder if there is a way to use Sockets or any other tools to make my app collaborative. I want to allow several people connect to my app and draw teamwise.
Is it possible with Windows Forms? I'd appreciate any suggestions.
At first: It doesn't matter if you use WinForms or any other template. You can easily add missing references to any type of project.
The two possible sockets would be either TCP or UDP.
A problem with these Sockets is that they are usually used for p2p connections.
Additionally only TCP guarantees the correct arrival of all sent packets, so in your case it would be highly recommended.
In this thread they discuss the problematic of many clients to one server:
TCP server with multiple Clients
If you made it to connect with multiple connections you should think of a system to handle each clients changes.
I'd propose a Server/Client system, where one person hosts the session.
Each client has a copy of the image and everytime someone changes a pixel a local event gets called that transmits the changes to the server.
The server now only has to "flush" the changes to every client connected.
One tricky thing could be two clients changing the same pixels at the same time, but thats your job =P
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
Rather new to socket programming in general. I am developing a C# application and basically I want the client to send files and text. How would the server be able to interpret the difference between the two? Is there a straightforward way of doing this? Do I just prepend some kind of textual descriptor? So the first few bytes describes what the netstream is about?
Any advice or even resources that I should look into would be very much appreciated!
HTTP / TCP / IP is a worthy protocol stack, either for you to use as an example or simply to use directly. It has a header that's perfect for what you have described: Content-Type. For example,
Content-Type: text/html; charset=ISO-8859-1
This declares that the data stream to follow is HTML coded in the Latin-1 character set.
Content-Type: image/jpeg
This says the data stream is JPEG.
There's a lot of details here. http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
C# (dotNet) has tons of fully debugged support for this.
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 searched for various samples online but I'm unable to find a suitable sample which is able to provide enough information.
I have tried Microsoft Expression Encoder, but the delay is too huge if I use broadcast method.
Directshow.net wise, the sample DxWebCam seems promising, but it lacks audio sample.
The idea I had in my mind is to send audio and video (frames) separately via TCP (or maybe UDP as highlighted by #macbral) but I am not sure how to handle synchronisation.
I'm looking at free samples as the current design is a 1 to 1 video conference via intranet.
Thanks for any help in advance.
I've been looking for the same and have given up on open source alternatives since none of those seem to work well from .NET.
I'm currently evaluating products from StreamCoders which looks promising: http://www.streamcoders.com/
You can check ConferenceXP (a bit old project, but made simple conferences with it myself, after converting code to new visual studio/framework). To encode video, make more advanced streams- you can work with VLC api or Expression Encoder. Also you can try microsoft live messanger api (As i remember they have conferences in it).
PS there also is Skype api, but havent even seen it, so can say nothing about using it..You can research it too.
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'm looking for a C# library that provides access to both SSH and Telnet under the same interface. What would be a good choice?
I recommend Granados for SSH stack. It has been used in many products.
I recommend this code project page for telnet stack.
You can also download Poderosa terminal emulator. It's using Granados as the SSH stack and it has its own implementation of telnet stack.
Poderosa is very pluggable. It provides a good abstraction layer on the network stacks. If you don't have time to write your own unified interface, you should really check out their work. It provides access to both SSH and Telnet under the same interface like what you want. Unfortunately, it's written by Japanese engineers. All the inline comments are written in Japanese. It may take you some time to understand the codes.
You may also like to check out the terminal emulation library as well. Since you are going to process the data returning from the remote terminals, most terminals return escape character sequence for device control commands, font color/style or cursor movement commands.
You may not notice that even in a simple command "ls -al", the returned content may also involve some escape character sequences. Those escape sequences are to make the directory name and file name shown in different colors.
Again, for terminal emulation, the best C# library I can find is Poderosa. If you don't have to use C# library, PuTTY has the best terminal emulation support. It can recognize almost all escape character sequences I have seen so far.
Although I highly recommend you to look at Poderosa and Granados, please be aware that these projects seem to be no longer active. Well.. even so, it's still the best I have seen.
Making the SSH work with C# is indeed very tricky and most of the implementations are either buggy or too slow. When we were making SmarTTY, we struggled with SharpSSH and SSH.Net a lot, and then finally decided to make our own C# wrapper around libssh2.
Although SmarTTY is not open-source, if you want to use its SSH library in your project, feel free to drop me an email. If there's a great demand for a library like that, we might release it as a separate product.
This link might help you C# Telnet Library
Minimalistic Telnet
telnetcsharp.codeplex.com
xpresslearn
thoughtproject.com
dotnettelnet
I couldn't find anything that provides identical (or even similar APIs) for both telnet and ssh, sharpSSH is a little library that nicely abstracts SSH.