the Socket Class

B

brettsbignose

Please inform me if microsoft has a better group to post this genre of
question on, but since I am working in vb.net, this was my best choice.

I am writing a program that can send UDP packets. Obviously, the
UDPClient is virtually worthless since it has zilch control over the
sender port number. Anyway, I finally perfected writing out my own UDP
header which includes the checksum, length, source port, and
destination port. However, I cannot seem to initialize the Socket
class so that I can send the same packets consistently. I tested my
application on(let's say) SystemA and it worked fine. I verified this
using Ethereal. I tested the same exact .exe on SystemB and the Socket
class, for some reason, added a UDP header to my packet. This is
obviously bad. I am concerned that the Socket does not act the same
from system to system... i.e. not reliable. What sort of things do I
need to do to guarantee that it will work the same from computer to
computer?
So, in short, I need to know what parameters to instantiate the Socket
class with so that I am provided with just a IP header so that I can
tack on my UDP and data. Also, it can't be just any IP header: it must
be one that is setup for UDP (0x11 or 17).

Do you catch my drift?

Thanks,
Brett

P.S. Please do not suggest that I try using something other than UDP.
Please do not suggest that I try to use a third party software( such as
Indy ). Thanks very much!!!
 
L

Larry Lard

Please inform me if microsoft has a better group to post this genre of
question on, but since I am working in vb.net, this was my best choice.

I'd try reposting this in microsoft.public.dotnet.framework.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top