Perl 中的 recv函数

首页 / Perl入门教程 / Perl 中的 recv函数

描述

This function receives a message on SOCKET attempting to read LENGTH bytes, placing the data read into variable SCALAR.The FLAGS argument takes the same values as the recvfrom( ) system function, on which the function is based. When communicating with sockets, this provides a more reliable method of reading fixed-length data than the sysread function or the line-based operator <FH>.

语法

以下是此函数的简单语法-

无涯教程网

recv SOCKET, SCALAR, LEN, FLAGS

返回值

此函数在标量context中返回:错误时为undef或读取的字节数。

链接:https://www.learnfk.comhttps://www.learnfk.com/perl/perl-recv.html

来源:LearnFk无涯教程网

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

React实战进阶45讲 -〔王沛〕

白话法律42讲 -〔周甲徳〕

Service Mesh实战 -〔马若飞〕

微信小程序全栈开发实战 -〔李艺〕

HarmonyOS快速入门与实战 -〔QCon+案例研习社〕

说透元宇宙 -〔方军〕

人人都用得上的数字化思维课 -〔付晓岩〕

Serverless进阶实战课 -〔静远〕

零基础GPT应用入门课 -〔林健(键盘)〕

好记忆不如烂笔头。留下您的足迹吧 :)