I am very new to sockets in vb .net. I need to convert some perl code to vb that uses sockets. First I need to encode some data base64. Then i need to establish a socket connection to "dyn.everydns.net" Then i need to send the encoded information through the socket and get a response.
Here is the perl code if you need it:

ummm, wow, i know no perl but you can start here...System.Net.Sockets Namespace
if you know any vb.net converting that code shouldnt be too much of a problem.

__________________Q: Did God really create the world in seven days?
A: He did it in six days and nights while living on cola and
candy bars. On the seventh day he went home and found out his
girlfriend had left him.

I know perl, and I looked at the documentation for sockets, but I have never done any work with sockets before and I don't know how I am supposed to use them.

Good, because I need major-league helpage with Perl sockets. I'm trying to accomplish my first ever network-related coding - so it's just a practice thing really. I have a Cisco router that might, say, spit some ping packets into my laptop via Ethernet. I want my Perl script to sit there and then, when the ping packets start coming in, print "I am being pung by a.b.c.d" (where a.b.c.d is the IP address of the router (I actually have five routers even on one Ethernet segment)).

I've tried an accept() function, and Perl warns "Accept() on opened socket." So I tried and "open (SOCKAGE);" to create the filehandle (apparently sockets need filehandles), and I got a "bad file descriptor." Yes, OK, the open() function requires me to name a file, even though I ain't trying to put anything into a disk file.

And now it complains that GENERIC_SOCKET is the unopened socket. Well DUH; doesn't the second argument to the "accept" function refer to whatever settings you want applied to a socket that comes in after the first socket (SOCKAGE, in my example) is opened?

I'm starting to think I'll have to learn assembly language or Unix internals just to understand this.

Good, because I need major-league helpage with Perl sockets. I'm trying to accomplish my first ever network-related coding - so it's just a practice thing really. I have a Cisco router that might, say, spit some ping packets into my laptop via Ethernet. I want my Perl script to sit there and then, when the ping packets start coming in, print "I am being pung by a.b.c.d" (where a.b.c.d is the IP address of the router (I actually have five routers even on one Ethernet segment)).

I've tried an accept() function, and Perl warns "Accept() on opened socket." So I tried and "open (SOCKAGE);" to create the filehandle (apparently sockets need filehandles), and I got a "bad file descriptor." Yes, OK, the open() function requires me to name a file, even though I ain't trying to put anything into a disk file.

And now it complains that GENERIC_SOCKET is the unopened socket. Well DUH; doesn't the second argument to the "accept" function refer to whatever settings you want applied to a socket that comes in after the first socket (SOCKAGE, in my example) is opened?

I'm starting to think I'll have to learn assembly language or Unix internals just to understand this.

ok to start you can open a socket like this, it creates a new instance of the io socket class:
$mysock = new IO::Socket::INET(
PeerAddr => "remoteaddresshere",
PeerPort => 'remoteporthere'
);

to get information from a socket you can use this:
@result = $sock->getlines();

it will get all the lines from the socket and store them the array result
perl cant run indefinatly though, when the script is executed it will end, so you cant really have a perl script that just sits and listens on a port

ok to start you can open a socket like this, it creates a new instance of the io socket class:
$mysock = new IO::Socket::INET(
PeerAddr => "remoteaddresshere",
PeerPort => 'remoteporthere'
);

to get information from a socket you can use this:
@result = $sock->getlines();

it will get all the lines from the socket and store them the array result
perl cant run indefinatly though, when the script is executed it will end, so you cant really have a perl script that just sits and listens on a port

Thank you for that; thought it did merely confirm what I suspected: THIS IS WAY OVER MY HEAD!!! I only know from Clinton Pierce's Teach Yourself Perl in 24 Hours, so this "new" function and the double-colons and the => operator are all Greek (well, Perl) to me. I don't even have a good understanding of what instances or classes are (and I come from a VMS background, so double-colons mean nodenames to me).

But, about the script not being able to sit and listen - aren't there cases where a Perl script will just hang while it's waiting for input (such as into the <STDIN> filehandle)? Or, couldn't I just put a REDO in there so the script is constantly looping while waiting for the port?