| Low-level socket functionsSend a message over a socketDaftar Isi - send SOCKET,MSG,FLAGS
Sends a message on a socket. Attempts to send the scalar MSG to the SOCKETfilehandle. Takes the same flags as the system call of the same name. Onunconnected sockets, you must specify a destination to send to, in whichcase it does a sendto(2) syscall. Returns the number of characters sent,or the undefined value on error. The sendmsg(2) syscall is currentlyunimplemented. See UDP: Message Passing in perlipc for examples. Note the characters: depending on the status of the socket, either(8-bit) bytes or characters are sent. By default all sockets operateon bytes, but for example if the socket has been changed usingbinmode() to operate with the :encoding(utf8) I/O layer (seeopen, or the open pragma, open), the I/O will operate on UTF-8encoded Unicode characters, not bytes. Similarly for the :encoding pragma: in that case pretty much any characters can be sent. |
| |
|