module Fastdfs::Client::ProtoCommon

Constants

EXTNAME_LEN
FILE_SEPERATOR
GROUP_NAME_MAX_LEN
HEAD_LEN
IPADDR
PORT
RECORD_SEPERATOR
RECV_MAX_LEN
SET_METADATA_FLAG_MERGE
SET_METADATA_FLAG_OVERWRITE
SIZE_LEN
TRACKER_BODY_LEN

Public Class Methods

header_bytes(cmd, hex_long, erron=0) click to toggle source
# File lib/fastdfs-client/proto_common.rb, line 22
def self.header_bytes(cmd, hex_long, erron=0)
  hex_bytes = hex_long.to_eight_buffer
  header = hex_bytes.fill(0, hex_bytes.length...HEAD_LEN)
  header[8] = cmd
  header[9] = erron
  header
end