internet module?

Discussion in 'Perl Misc' started by echohtp@gmail.com, Jul 8, 2005.

  1. Guest

    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
     
    , Jul 8, 2005
    #1
    1. Advertising

  2. Paul Lalli Guest

    wrote:
    > 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
     
    Paul Lalli, Jul 8, 2005
    #2
    1. Advertising

  3. wrote:

    > 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.
     
    Brian McCauley, Jul 8, 2005
    #3
  4. Guest

    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?
     
    , Jul 8, 2005
    #4
  5. wrote:

    > 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.
     
    Brian McCauley, Jul 8, 2005
    #5
  6. Guest

    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!
     
    , Jul 9, 2005
    #6
  7. Joe Smith Guest

    wrote:
    > 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
     
    Joe Smith, Jul 10, 2005
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jiong Feng
    Replies:
    2
    Views:
    553
    Wade A. Hilmo [MS]
    Nov 29, 2003
  2. cmay
    Replies:
    0
    Views:
    1,162
  3. Maric Michaud
    Replies:
    0
    Views:
    7,212
    Maric Michaud
    Jun 24, 2006
  4. Jason Zhang
    Replies:
    2
    Views:
    472
    Jason Zhang
    Jan 23, 2006
  5. John Smith
    Replies:
    1
    Views:
    163
    Evertjan.
    Mar 12, 2005
Loading...

Share This Page