Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: What is the difference between sending bytes and characters over sockets?

by tilly (Archbishop)
on Feb 20, 2004 at 22:18 UTC ( [id://330678]=note: print w/replies, xml ) Need Help??


in reply to What is the difference between sending bytes and characters over sockets?

You really need to find out what the difference is between what you sent, and what that person expected to see.

If you are on Windows, you very well may need to use binmode to be sure that your end of line doesn't get translated into 2 characters. You might be sending numbers and they need the output of a pack statement (see also unpack) rather than a text representation of the number. There are stranger possibilities. For instance the program at the other end of the line might be written in C, and might be looking for the end of your string to be a null byte (you write that as "\0"). Or you could unexpectedly be sending data in UTF-8 format and need to turn that off.

The description makes it unclear how to solve the problem. You need to first get more detail about how what you sent doesn't match what is needed, and then figure out how to solve that.

  • Comment on Re: What is the difference between sending bytes and characters over sockets?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://330678]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-26 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found