Any example design code in C# or VB.NET ?
Looking for a UDP Pipe example in .NET
I downloaded
Simple UDP proxy/pipe 0.4.1
by Luigi Auriemma
Which is in C++..
it works perfectly.. but I want to make my own implemention in .NET.. so I can sniff packets directly.
Fixed it here is the solution if anyone wants to learn how I fixed it.. Please note this is probably the only UDP Proxy on all of google if you stumbled upon this.. that is coded in C#.. easily ported to VB.NET with online .NET converter
Be happy this code works 😉
Sure it’s not efficient because it doesn’t use events.. like ReceiveAsync/EndReceive.
Only downfall to not using Aysnchronize events.. is that you see below the working code.. will have to be stuck in a infinite loop.. and it will burn your CPU cycles.. easily fixed with a Thread.Sleep(10).. (don’t set to high or you will have udp lag)
I always look back at this answer when I start a new UDP Proxy project and the above code has issues with certain UDP Servers where it loses connections, (on a connectless protocol) ya I have no idea how it happens but I fixed it with using UDPClient instead of Sockets
Here is a different variant of the
TCP or UDP Redirector / UDP Proxy / UDP Pipe / TCP Proxy / TCP Pipe
I created many different models of UDP Proxy connection bouncers and they all seem to loose connection using the standard Sockets class, but using UDPClient classes this problem completely went away.
The UDP Proxy is only 25 lines of code but the power and stability is off the charts
Below is examples how to do it in both TCP and UDP
C# Code below
VB.NET Code Below