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!
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 1 year ago.
Improve this question
Does anyone know if there is a free tool for testing TCP/IP socket communications?
I am developing code to connect to an industrial printer which uses TCP/IP comms. and would like to get started prior to actually having the hardware.
It would be great if there was either a tool I could install locally on Windows10 or even an free online tool that I could send packets to and have echo back or display the bytes I sent, etc.
You can start a local server using netcat. Try running nc -l -p 1234 to listen on port 1234.
You can also write a simple C# application that listens for socket connections, accepts them and prints them on the console.
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 3 years ago.
Improve this question
I have problem, because I can send data from program for example program1 to program2.
I see that can use events, observer but the problem is how.
Sorry but I not have any code.
Can anybody take here example or link for help to understand events and observers?
Let me quickly refer you to Microsoft Docs. This may or may not be exactly what you need, but it should point you in the right direction.
The linked docs list the following options:
Clipboard
COM
Data Copy
DDE
File Mapping
Mailslots
Pipes
RPC
Windows Sockets
There are many articles/guides on how to implement each of those options, so all you really have to do is to Google.
There are also obviously many other options, such as sending data over HTTP or any other easy-to-setup-and-use communications protocol already implemented in .NET (which is presumably what you are using).
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.
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.