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 4 years ago.
Improve this question
I'm looking for a way to listen on a specific port as a VNC server, then be able to send whatever I want to the connected VNC client.
There's a lot of VNC client components, but I've not yet found a .net VNC server component.
I intend to use this to allow a client to connect directly to my windows form (and only the form, so they don't see any desktop, just my window). I realise this would normally cause input issues, but I will be forcing the clients to connect in view-only mode.
I'm very familiar with the various User32/Gdi32 platform APIs for capturing a window's contents to an image, so if it's a case of writing image data to a VNC server stream, that's fine too.
Where should I start? Is there an existing VNC server component that does what I'm describing? If not, is anyone aware of a RFB protocol component that makes it easier to communicate with a VNC client, perhaps even performing the image diff and sending only the changes?
It isn't a component, but Alkit VNC does seem to do what you're asking, which is share a single window using a VNC server. The source is available, too.
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 am creating File Compressor in C# and i have to add the functionality to add files from the computer connected on LAN. And i have no idea how to implement that basically i insert every file in a list and at the end will compress them and zip them.
I need help regarding how can i transfer those selected files from other computer connected on network? So that i can zip them at the end?
Unless you are using a restricted project type (WinRT, Universal Windows App, etc.) you could just use network shares. The System.IO namespace can handle them just fine. All you need to do is use the \\[IP or machine name]\[share name] addressing.
Note that network shares need to be configured separately - your app likely won't be able to enable a share on a remote system.
Try using a symbolic link (this can easily be done through powershell) and then reference that link.
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 some application that communicates via a RS-232 serial port.
Is there some application or library that I can use to send data to a local serial port?
I need it to be able to locally debug my application.
If your looking to virtulize a serial port in code, then this will do the trick for you.
http://com0com.sourceforge.net/
As for .NET code, then the "SerialPort" class is incredibly easy to use, a good reference (Iv'e used many times) can be found here.
http://msmvps.com/blogs/coad/archive/2005/03/23/SerialPort-_2800_RS_2D00_232-Serial-COM-Port_2900_-in-C_2300_-.NET.aspx
Using the .NET serial class, you can do what you need in very few lines of code. Be aware though, you WILL need to use delegates to update your UI.
There are plenty of options when it comes to sending through RS232. Here are some applications that may help you to sent data using RS232:
RS232 Hex Com Tool -which is a serial software terminal program that can be used to communicate with just about any RS232 peripheral.
COM Port Data Emulator -it can create a data flow, wrap it to data packets (RS232, TCP/IP or UDP) and send to a port.
Serial Port Monitor - which also may be helpful with your problem.
Anyway, its up to you what you will choose. 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 5 years ago.
Improve this question
Can anyone indicate a good 3270 emulator (which can login, scrape screen, find text, send keys etc. in background) for .NET (win and web). Something very similar to http://www.zephyrcorp.com/legacy-integration/index.htm (apparently zephyr costs like $5k per year, which is quite a lot, for one PC).
I also tried http://open3270.codeplex.com/SourceControl/list/changesets but it's way old and buggy.
Attachmate Reflection is really good, it meets all the requirements you mentioned and it has a great .NET API you can use to easily automate it from your .NET code. They don't list prices on their website but I think it is under $300...
For Desktop: I liked the idea of using a stable and well known client and remote control this instance. Therefore I ended up using x3270 (http://x3270.bgp.nu/) as the full featured, mature client in combination with X3270.Rest (https://www.nuget.org/packages/X3270.Rest/) that let's you remote control it from within a .NET application via the exposed REST interface (http://x3270.bgp.nu/rest.html). Reimplementing a complete new .NET client was not really an option because of all the alternatives out there. All those pitfalls on the road that lead to an reinvented wheel... But with an appropriate interface like the one mentioned it was quite easy to automate tasks without using DDE/HLLAPI.
If running in the background means without visible window one could start the x3270 client from .NET via Process.Start with suitable arguments to avoid a window beeing created.
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 8 years ago.
Improve this question
Does anyone knows of any .Net library or resources that will assist me to implement a TCP port scanner?
For simple one, that will just try to connect to each port and report success / failure, without any "tricks", like sending only ACK packets etc. - you won't need anything else than System.Net and System.Net.Sockets, create socket, try connecting to a host, check if you have succeeded. For better performance, you can create more sockets, and use asynchronous approach (BeginConnect/EndConnect).
I found some example codes.
http://www.geekpedia.com/tutorial142_Creating-a-Port-Scanner-with-Csharp.html
http://www.dijksterhuis.org/building-a-simple-portscanner-in-c/
WinPcap is a network monitoring and packet capturing tool but it might be also useful because it is another way to get an idea about network transmissions. But it may not suit to your requirement.
You can try my open source program here ;)
http://dercousin.xhost.ro/index.php?option=com_content&view=category&layout=blog&id=35&Itemid=53
You can use Pcap.Net to create and send raw packets.
You can also capture packets using this framework.
It includes a packet interpretation and creation framework so it should be pretty easy to create the packets you need to scan the ports and to parse the packets returned.
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 2 years ago.
Improve this question
Hey, I have been looking on google and I cannot seem to find anything about peer to peer transfer.
Basically, I want to be able to send a file from my computer to someone else's computer. Does anyone know of any guides that can help me with this?
Thanks.
Google "System.Net.PeerToPeer", a namespace available in the .NET 3.5 framework. You'll have no trouble finding docs and sample code.
If you really just want to "send a file from my computer to someone else's computer" using C# then you may not be looking for true p2p. You can just use raw TCP. For this you need the remote computer to listen for a connection, your computer to open a connection to the remote computer, and start sending data.
There's a very basic example on how to do something like that here.
If you are actually looking for true P2P then you're best off using an existing P2P network (otherwise there will be nobody but you and your other computer on it). There are a few C# BitTorrent libraries around - for example BitSharp, TorrentNet. There is a whole question about BitTorrent libraries written in pure C#.
If the destination computer is able to expose a URI to publish to then you can simply use
WebClient.UploadFile(Uri address, string filename)
It very simply just takes a URI as address (http, ftp, even the file protocol to transfer to a folder share).
But that does require setting up something server side to publish to, but it would be platform independent on the server (e.g. any old FTP server, or a web page or service that accepts a file by POST method). Security may be an issue you need to consider however.
That's using a push model. WebClient can also be used from the other side to download. It also supports transfer of data streams, strings, etc.
Have a look at this project on Code Project.
It provides for P2P chat and file transfer and could be either an inspiration or a solution.