c# - Listen to a range of UDP ports -


i'm listening when game joins server , know range of ports unfortunately udpclient's receive functionality listens specific port. since port joins random in range, there way handle listening on udp port range?

this games forum developers: "dota 2 uses udp protocol , communicates on ports 27015 through 28999 our dedicated servers. default, client opens udp port 27005 or computer connect game servers." - http://dev.dota2.com/showthread.php?t=15261

it's not possible sockets api. you'll want use library ties tcp/ip stack @ deeper level, example libpcap.

since use c#, you'd interested in pcap.net, .net interface winpcap

if wanted match destination udp port, use filter of

udp[2:2] >= 9000 , udp[2:2] < 9100 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -