internet module?

E

echohtp

hey i know this is a very basic question but after looking around i
cant seem to find out which modules ( or if they even are modules ) i
would need to work with to connect to another computer, IE using inet.h
headers in c or c++ , so any help or link to a tutorial or even a push
in the right direction would be GREATLY appericated. thanks :)

-nenn
 
P

Paul Lalli

hey i know this is a very basic question but after looking around i
cant seem to find out which modules ( or if they even are modules ) i
would need to work with to connect to another computer, IE using inet.h
headers in c or c++ , so any help or link to a tutorial or even a push
in the right direction would be GREATLY appericated. thanks :)

The answer to this question depends almost entirely on what method of
connecting. Perhaps you could describe your purpose? Are you trying
to contact a webserver using a client? Are you trying to write a
webserver other clients will connect to? Trying to do something with
the FTP, Telnet, SCP, SSH, or other proticols?

The most basic answer to your question is "Search CPAN". You can do
that buy visiting http://search.cpan.org/ and either typing a likely
search query, or clicking on a likely category heading.

Paul Lalli
 
B

Brian McCauley

hey i know this is a very basic question but after looking around i
cant seem to find out which modules ( or if they even are modules ) i
would need to work with to connect to another computer, IE using inet.h
headers in c or c++ , so any help or link to a tutorial or even a push
in the right direction would be GREATLY appericated. thanks :)

Documentation on low-level internet protocol socket operations is in
"perlipc".

Note: you should use the IO::Socket module not the Socket module which
is largely a legacy.

As others pointed out - if you are using anything other than a totally
home-brew protocol there's a good chance there's already a higher level
module on CPAN.
 
E

echohtp

im trying to open a socket and recieve a few "numbers" (actual numbers)
then perform some math on them and return the result then recieve some
more data. cani use IO:Socket for this?
 
B

Brian McCauley

im trying to open a socket and recieve a few "numbers" (actual numbers)
then perform some math on them and return the result then recieve some
more data. cani use IO:Socket for this?

That's rather hard for me to guess. I know that I could use IO::Socket
for this. But given that having (presumably) looked at the examples in
the document I mentioned before you still think you need to ask, I would
suspect you'd find it somewhat of a challenge.
 
E

echohtp

thanks, i think this is exactly what im looking for, and in the mean
time ill work on my silly little irc bot :) once again thanks!
 
J

Joe Smith

im trying to open a socket and recieve a few "numbers" (actual numbers)
then perform some math on them and return the result then recieve some
more data.

What's a "number"?

Seriously. There are many ways that a number can be presented; do
know which one you will be using?

Binary format:
single byte: 8 bits
two bytes: 16 bits in little-endian format
two bytes: 16 bits in big-endian format
four bytes: 32 bits LE or 32 bits BE
eight bytes: 64 bits LE or 64 bits BE or 64-bit float
ten bytes: 80 bits of IEEE floating point format

Text format:
Some number of ASCII digit characters terminated by a
non-digit character, such as "\n".
Exponential notation: "+" or "-" or "", digits, ".", digits,
"e", "+" or "-" or "", digits.

Have you given any thought as to being able to send not just numbers
but commands and responses?
-Joe
 

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

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top