Swoole Swoole\Buffer 클래스
(PECL swoole >= 1.9.0)
소개
클래스 개요
class Swoole\Buffer {
/* Methods */
public append(string $data): int
public clear(): void
public __destruct(): void
public expand(int $size): int
public read(int $offset, int $length): string
public recycle(): void
public substr(int $offset, int $length = ?, bool $remove = ?): string
public __toString(): string
public write(int $offset, string $data): void
}
목차
- Swoole\Buffer::append — 메모리 버퍼 끝에 문자열 또는 이진 데이터를 추가하고 할당된 새 메모리 크기를 반환합니다.
- Swoole\Buffer::clear — 메모리 버퍼를 재설정합니다.
- Swoole\Buffer::__construct — 고정 크기 메모리 블록 할당.
- Swoole\Buffer::__destruct — Swoole 메모리 버퍼를 파괴합니다.
- Swoole\Buffer::expand — 메모리 버퍼의 크기를 확장합니다.
- Swoole\Buffer::read — 오프셋과 길이를 기반으로 메모리 버퍼에서 데이터를 읽습니다.
- Swoole\Buffer::recycle — 메모리 버퍼에서 사용하지 않는 메모리를 OS에 해제합니다.
- Swoole\Buffer::substr — 오프셋과 길이를 기반으로 메모리 버퍼에서 데이터를 읽습니다. 또는 메모리 버퍼에서 데이터를 제거하십시오.
- Swoole\Buffer::__toString — 메모리 버퍼의 문자열 값을 가져옵니다.
- Swoole\Buffer::write — 메모리 버퍼에 데이터를 씁니다. 버퍼에 할당된 메모리는 변경되지 않습니다.